Merge "Only include exported flags in android-flags.jar" into main am: 8070c4b457
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2878135 Change-Id: Iec7dbbd0b685a6be473bde2d8c79780e5a035c1b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
736f453ddc
1 changed files with 9 additions and 1 deletions
|
@ -71,9 +71,17 @@ var (
|
||||||
// java_aconfig_libraries to be consumed by apps built outside the
|
// java_aconfig_libraries to be consumed by apps built outside the
|
||||||
// platform
|
// platform
|
||||||
exportedJavaRule = pctx.AndroidStaticRule("exported_java_aconfig_library",
|
exportedJavaRule = pctx.AndroidStaticRule("exported_java_aconfig_library",
|
||||||
|
// For each aconfig cache file, if the cache contains any
|
||||||
|
// exported flags, generate Java flag lookup code for the
|
||||||
|
// exported flags (only). Finally collect all generated code
|
||||||
|
// into the ${out} JAR file.
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf ${out}.tmp` +
|
Command: `rm -rf ${out}.tmp` +
|
||||||
`&& for cache in ${cache_files}; do ${aconfig} create-java-lib --cache $$cache --out ${out}.tmp; done` +
|
`&& for cache in ${cache_files}; do ` +
|
||||||
|
` if [[ -n "$$(${aconfig} dump --cache $$cache --filter=is_exported:true --format='{fully_qualified_name}')" ]]; then ` +
|
||||||
|
` ${aconfig} create-java-lib --cache $$cache --mode=exported --out ${out}.tmp; ` +
|
||||||
|
` fi ` +
|
||||||
|
`done` +
|
||||||
`&& $soong_zip -write_if_changed -jar -o ${out} -C ${out}.tmp -D ${out}.tmp` +
|
`&& $soong_zip -write_if_changed -jar -o ${out} -C ${out}.tmp -D ${out}.tmp` +
|
||||||
`&& rm -rf ${out}.tmp`,
|
`&& rm -rf ${out}.tmp`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
|
|
Loading…
Reference in a new issue