summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-06-20 22:40:02 -0700
committer Colin Cross <ccross@android.com> 2023-07-25 21:30:21 +0000
commit4eae06dcc929eeb74f12baa0e684327a0794f120 (patch)
treeda608cbceee81da599669fbd913649d9a6e14384 /java/java.go
parent958ca02582952def7d5daf13574486c6079ac18b (diff)
Move android_library resource handling to Bazel's ResourceProcessorBusyBox
The R.Java files generated by aapt2 link --no-static-lib-packages cause scaling problems by combining all resources into every package listed in a dependencies' AndroidManifest.xml file. For SystemUI-core this results in 74 R.java files, each with 76k lines, and takes 20 seconds to compile in javac. Both AGP and Bazel have workarounds for this that avoid using the R.java files generated by aapt2, instead generating more efficient R.class files directly based on the R.txt file. Bazel uses the ResourceProcessorBusyBox tool that is already present in our tree to process the resources. Reuse the same tool in Soong to create the R.jar. The more efficient R.class files require modifiying source files that use incorrect packages to refer to resources. Bug: 284023594 Test: TestAndroidResourceProcessor Change-Id: I026073b40dabcfdb10e5d7a52e9348205b0e9a66 Merged-In: I026073b40dabcfdb10e5d7a52e9348205b0e9a66
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 6388d13e3..ce14df778 100644
--- a/java/java.go
+++ b/java/java.go
@@ -692,7 +692,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.dexpreopter.uncompressedDex = *j.dexProperties.Uncompress_dex
j.classLoaderContexts = j.usesLibrary.classLoaderContextForUsesLibDeps(ctx)
}
- j.compile(ctx, nil)
+ j.compile(ctx, nil, nil, nil)
// Collect the module directory for IDE info in java/jdeps.go.
j.modulePaths = append(j.modulePaths, ctx.ModuleDir())