summaryrefslogtreecommitdiff
path: root/java/java_resources.go
AgeCommit message (Collapse)Author
2019-05-06Track sources for srcjars across modulesColin Cross
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
2019-05-06Allow module types to generate resourcesColin Cross
Robolectric will need to generate extra resources to be added to the jar. Test: TestResources Change-Id: I028f91ea8fc5d1e59e4e805876d70f57d8899f11
2019-03-20Replace ctx.ExpandSources with android.PathsForModuleSrcColin Cross
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
2019-03-20Remove ModuleSrcPathColin Cross
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
2018-09-28soong_zip: support globs in -f and -D argumentsColin Cross
-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
2018-09-26Revert "soong_zip: support globs in -f and -D arguments"Colin Cross
This reverts commit 08e28abc4ecd10a0e0ab2dcb683560f9c6331e1b. Reason for revert: inserts extra ../../ entries in the zip file. Bug: 116737386 Change-Id: I048f94889a66fe618058e37a5827d0cf6b1a6b68
2018-09-21soong_zip: support globs in -f and -D argumentsColin Cross
-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
2018-09-13Allow exclude_java_resources to affect java_resource_dirsColin Cross
Allow excluding files from directory globbed by java_resource_dirs. Test: java_test.go Change-Id: I9922842248be1a386ab111a5187608438638ffb1
2018-04-16Add support for android_library modulesColin Cross
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