From 31db53a734080b18eef4985fc9c5b2005a6c1f30 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Fri, 6 Dec 2024 16:40:47 -0800 Subject: Support jarjar sharding - If the new option `jarjar_shards` is set, use this as the number of shards and enable sharding. - The plan is to use it on "big" jars such as framework-minus-apex, but for now, we only use it in a "test" target, `framework-minus-apex_jarjar-sharded`. - Also add `framework-minus-apex_jarjar-sharded` to the various hardcoded spacial cases. 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: EXEMPT New options are not used on production jars Change-Id: I94c2ad978add25267f22b65c063e9148901b208b --- android/container.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'android/container.go') diff --git a/android/container.go b/android/container.go index 27b17ed99..99e6a3075 100644 --- a/android/container.go +++ b/android/container.go @@ -197,7 +197,10 @@ var unstableInfoProvider = blueprint.NewProvider[unstableInfo]() func determineUnstableModule(mctx ModuleContext) bool { module := mctx.Module() - unstableModule := module.Name() == "framework-minus-apex" + + // TODO(b/383559945) Remove "framework-minus-apex_jarjar-sharded" once + // we remove this module. + unstableModule := module.Name() == "framework-minus-apex" || module.Name() == "framework-minus-apex_jarjar-sharded" if installable, ok := module.(InstallableModule); ok { for _, staticDepTag := range installable.StaticDependencyTags() { mctx.VisitDirectDepsWithTag(staticDepTag, func(dep Module) { -- cgit v1.2.3-59-g8ed1b