aboutsummaryrefslogtreecommitdiff
path: root/java/java_resources.go
Commit message (Collapse)AuthorAgeFilesLines
* convert java_resources with bp2buildSam Delmerico2022-05-101-11/+31
| | | | | | Test: b build --platforms=//build/bazel/platforms:linux_x86 //external/jarjar:jarjar-binary and try to use on a jar Change-Id: Id6f4e6937687fd575360fbacaeda55c41922636e
* Track sources for srcjars across modulesColin Cross2019-05-061-8/+0
| | | | | | | | | Robolectric coverage needs a srcjar that sometimes needs to include sources of dependencies. Track the arguments and dependencies necessary to jar the sources. Test: TestIncludeSrcs Change-Id: I9979d2b8350923a2237e743c232e6e548f54ba3b
* Allow module types to generate resourcesColin Cross2019-05-061-1/+9
| | | | | | | | Robolectric will need to generate extra resources to be added to the jar. Test: TestResources Change-Id: I028f91ea8fc5d1e59e4e805876d70f57d8899f11
* Replace ctx.ExpandSources with android.PathsForModuleSrcColin Cross2019-03-201-2/+2
| | | | | | | | | | | Move the logic from ctx.ExpandSources into android.PathsForModuleSrc and ctx.ExpandSource into android.PathForModuleSrc, and deprecate them. When combined with the pathDepsMutator this will let all properties that take source paths also take filegroups or genrule outputs, as long as they are tagged with `android:"path"`. Test: All soong tests Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
* Remove ModuleSrcPathColin Cross2019-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | ModuleSrcPath was designed as a type that ensured that modules only referenced sources inside the directory that contained the Android.bp file. In practice they don't work very well, because allowing filegroups and genrules as inputs to any module that takes a source path means that the path might end up being to a file in another source directory or to a generated file in the output directory. Remove ModuleSrcPath, replacing it with SourcePath in the places that need to explicitly refer to a path in the source tree, or Path where it may be a source path or a generated path. Make PathForModuleSrc return a Path instead of a SourcePath in preparation for consolidation with ctx.ExpandSources, which will make it possibly return paths to generated files. Test: All soong tests Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
* soong_zip: support globs in -f and -D argumentsColin Cross2018-09-281-2/+4
| | | | | | | | | | | | | | | | | | | | -f and -D arguments can now take globs in the Soong format. Also update the use of soong_zip that jars resources to escape the globs in the arguments, and then shell-escape them when writing to the rsp file so the glob escape are not intepreted by ReadRespFile. Also remove an unused argument to the buildAAR rule that could have contained values that needed escaping. Relands I7f20bb169dc01f952d2a7681ec6ee9c05737ed37 with a fix for trailing "\n" in list files, which causes a call to pathtools.Glob("") that returns "./", which could then get incorrectly translated to "../../../" in the zip file. Also adds tests. Test: m checkbuild Test: zip_test.go Change-Id: I54b8eef9231875e6042a32c9f8bcc5c2f779922a
* Revert "soong_zip: support globs in -f and -D arguments"Colin Cross2018-09-261-4/+2
| | | | | | | | | This reverts commit 08e28abc4ecd10a0e0ab2dcb683560f9c6331e1b. Reason for revert: inserts extra ../../ entries in the zip file. Bug: 116737386 Change-Id: I048f94889a66fe618058e37a5827d0cf6b1a6b68
* soong_zip: support globs in -f and -D argumentsColin Cross2018-09-211-2/+4
| | | | | | | | | | | | | | -f and -D arguments can now take globs in the Soong format. Also update the use of soong_zip that jars resources to escape the globs in the arguments, and then shell-escape them when writing to the rsp file so the glob escape are not intepreted by ReadRespFile. Also remove an unused argument to the buildAAR rule that could have contained values that needed escaping. Test: m checkbuild Change-Id: I7f20bb169dc01f952d2a7681ec6ee9c05737ed37
* Allow exclude_java_resources to affect java_resource_dirsColin Cross2018-09-131-1/+3
| | | | | | | Allow excluding files from directory globbed by java_resource_dirs. Test: java_test.go Change-Id: I9922842248be1a386ab111a5187608438638ffb1
* Add support for android_library modulesColin Cross2018-04-161-0/+113
Add support for compiling android_library modules into AARs, and refactor app support on top of it. Bug: 73724997 Test: app_test.go Change-Id: I1dfac5fffe577c6680bc4709147b2061eb7d819c