[Ravenwood] Apply a common policy across all code
Some policies should apply to all code processed by hoststubgen
universally, e.g. host side JVM workarounds. Update hoststubgen to
accept multiple policy files, and make sure all existing framework jars
have this universal policy applied.
Flag: EXEMPT host test change only
Bug: 292141694
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Icc0e775b5ba0dd6a09768be8cda4b03cb33522a5
diff --git a/ravenwood/Framework.bp b/ravenwood/Framework.bp
index 07b4534..5cb1479 100644
--- a/ravenwood/Framework.bp
+++ b/ravenwood/Framework.bp
@@ -30,6 +30,7 @@
tools: ["hoststubgen"],
srcs: [
":framework-minus-apex-for-host",
+ ":ravenwood-common-policies",
":ravenwood-framework-policies",
":ravenwood-standard-options",
":ravenwood-annotation-allowed-classes",
@@ -46,6 +47,7 @@
"--debug-log $(location hoststubgen_framework-minus-apex.log) " +
"--out-jar $(location ravenwood.jar) " +
"--in-jar $(location :framework-minus-apex-for-host) " +
+ "--policy-override-file $(location :ravenwood-common-policies) " +
"--policy-override-file $(location :ravenwood-framework-policies) " +
"--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) "
@@ -180,17 +182,18 @@
"--debug-log $(location hoststubgen_services.core.log) " +
"--stats-file $(location hoststubgen_services.core_stats.csv) " +
"--supported-api-list-file $(location hoststubgen_services.core_apis.csv) " +
-
- "--out-jar $(location ravenwood.jar) " +
-
"--gen-keep-all-file $(location hoststubgen_services.core_keep_all.txt) " +
"--gen-input-dump-file $(location hoststubgen_services.core_dump.txt) " +
+ "--out-jar $(location ravenwood.jar) " +
"--in-jar $(location :services.core-for-host) " +
+
+ "--policy-override-file $(location :ravenwood-common-policies) " +
"--policy-override-file $(location :ravenwood-services-policies) " +
"--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ",
srcs: [
":services.core-for-host",
+ ":ravenwood-common-policies",
":ravenwood-services-policies",
":ravenwood-standard-options",
":ravenwood-annotation-allowed-classes",
@@ -247,21 +250,20 @@
"--debug-log $(location hoststubgen_core-icu4j-for-host.log) " +
"--stats-file $(location hoststubgen_core-icu4j-for-host_stats.csv) " +
"--supported-api-list-file $(location hoststubgen_core-icu4j-for-host_apis.csv) " +
-
- "--out-jar $(location ravenwood.jar) " +
-
"--gen-keep-all-file $(location hoststubgen_core-icu4j-for-host_keep_all.txt) " +
"--gen-input-dump-file $(location hoststubgen_core-icu4j-for-host_dump.txt) " +
+ "--out-jar $(location ravenwood.jar) " +
"--in-jar $(location :core-icu4j-for-host) " +
- "--policy-override-file $(location :icu-ravenwood-policies) " +
- "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ",
+
+ "--policy-override-file $(location :ravenwood-common-policies) " +
+ "--policy-override-file $(location :icu-ravenwood-policies) ",
srcs: [
":core-icu4j-for-host",
+ ":ravenwood-common-policies",
":icu-ravenwood-policies",
":ravenwood-standard-options",
- ":ravenwood-annotation-allowed-classes",
],
out: [
"ravenwood.jar",