Add a sharded version of "framework-minus-apex"...
... for local testing of "sharded jarjar".
We don't use the output of this module for anything yet.
- Trace without sharding enabled: https://screenshot.googleplex.com/9SjqdsEU4YxWJ8z
- Trace with RELEASE_USE_SHARDED_JARJAR_ON_FRAMEWORK_MINUS_APEX:
https://screenshot.googleplex.com/mHozfTMqmK9boH6
Test: m framework-minus-apex framework-minus-apex_jarjar-sharded
and make sure the javac output jars have the same entries.
$ diff \
<(jar tf $ANDROID_BUILD_TOP/out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/jarjar/framework.jar \
| sort) \
<(jar tf $ANDROID_BUILD_TOP/out/soong/.intermediates/frameworks/base/framework-minus-apex_jarjar-sharded/android_common/jarjar/framework-minus-apex_jarjar-sharded.jar \
| sort)
(no output)
Bug: 383559945
Flag: RELEASE_USE_SHARDED_JARJAR_ON_FRAMEWORK_MINUS_APEX
Change-Id: I2406f93f794b75a3f922d9c6f1234c1ae73ba330
diff --git a/Android.bp b/Android.bp
index 68048c6..35e59df 100644
--- a/Android.bp
+++ b/Android.bp
@@ -517,6 +517,50 @@
],
},
jarjar_prefix: "com.android.internal.hidden_from_bootclasspath",
+
+ jarjar_shards: select(release_flag("RELEASE_USE_SHARDED_JARJAR_ON_FRAMEWORK_MINUS_APEX"), {
+ true: "10",
+ default: "1",
+ }),
+}
+
+// This is identical to "framework-minus-apex" but with "jarjar_shards" hardcodd.
+// (also "stem" is commented out to avoid a conflict with the "framework-minus-apex")
+// TODO(b/383559945) This module is just for local testing / verification. It's not used
+// by anything. Remove it once we roll out RELEASE_USE_SHARDED_JARJAR_ON_FRAMEWORK_MINUS_APEX.
+java_library {
+ name: "framework-minus-apex_jarjar-sharded",
+ defaults: [
+ "framework-minus-apex-with-libs-defaults",
+ "framework-non-updatable-lint-defaults",
+ ],
+ installable: true,
+ // For backwards compatibility.
+ // stem: "framework",
+ apex_available: ["//apex_available:platform"],
+ visibility: [
+ "//frameworks/base",
+ "//frameworks/base/location",
+ // TODO(b/147128803) remove the below lines
+ "//frameworks/base/apex/blobstore/framework",
+ "//frameworks/base/apex/jobscheduler/framework",
+ "//frameworks/base/packages/Tethering/tests/unit",
+ "//packages/modules/Connectivity/Tethering/tests/unit",
+ ],
+ errorprone: {
+ javacflags: [
+ "-Xep:AndroidFrameworkCompatChange:ERROR",
+ "-Xep:AndroidFrameworkUid:ERROR",
+ ],
+ },
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ warning_checks: [
+ "FlaggedApi",
+ ],
+ },
+ jarjar_prefix: "com.android.internal.hidden_from_bootclasspath",
+ jarjar_shards: "10",
}
java_library {