Commit graph

7 commits

Author SHA1 Message Date
Colin Cross
95f18bd6c5 Strip device name from gen_notice license files
The output libcore-library-notices gen_notice module is embedded in
core-module-lib-stubs, which is a transtiive dependency of effectively
every javac invocation targeting the device.  The output files listed
in the notice file can contain a path that includes the device name,
for example "target/product/generic_arm64/system/framework/core-libart.jar".
This causes the stubs contents to be different for every product,
which drastically reduces the cache hit rate of RBE.  Strip the
"out/target/product/generic_arm64" prefix from paths in the notice
file.

Bug: 262620891
Test: unzip -p out/soong/.intermediates/libcore/art.module.public.api.stubs.module_lib/android_common/turbine-combined/art.module.public.api.stubs.module_lib.jar NOTICES/libcore-NOTICES.txt
Change-Id: I705ed1252ef2a595dae53873993adefa1ea85662
2022-12-14 15:43:39 -08:00
Bob Badour
3800b5a787 Only generated notices for built variants.
Test: banchan dcla-notice mainline_modules_arm64; m apps_only dist
Change-Id: I6b0e2eb64f2f3db87dfed68affb44fe141da3eaa
2022-11-14 14:17:55 -08:00
Bob Badour
4660a9824c Integrate gen_notice with Make for dist.
Most exempt module types have no output. Support exempt module types
with output by requiring they must be 0p and have no license metadata.

Disallow `licenses: []` property on gen_notice.

Test: m cts dist

Change-Id: Ic992bd6420fa6898495866eac43495002ef4b6c8
Merged-in: Ic992bd6420fa6898495866eac43495002ef4b6c8
2022-09-14 14:21:44 -07:00
Bob Badour
e38387314a Fix gen_notice init to support arch and dist.
Incorrect init function was called so Stem property was not handled
correctly and the dist properties were treated as unknown.

Test: m droid dist
Change-Id: I5eb8771afb4fda332df08cf1560df5c17d1316cc
2022-09-08 12:07:10 -07:00
Bob Badour
c6ec9fb849 Fix strip_prefix flags to strip install paths.
Bug: 235331488

Test: m droid dist

Change-Id: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
2022-06-09 14:24:41 -07:00
Bob Badour
a5ea2479d3 Fix bug: allow multiple gen_notice modules.
Test: m cts dist reportmissinglicenses

Change-Id: I07963c83eaddfe363a04871e813b56fe7f1465ad
2022-05-20 16:54:00 -07:00
Bob Badour
eef4c1c563 Add gen_notice module.
Refactor notices to support notices for multiple modules.

Enforce visibility and handle missing dependencies.

Bug: 213388645

Change-Id: Id6a81987f087419ad37d0cce57a71e8a7c4cd6e0
2022-05-18 16:38:19 -07:00