Declare proguard_dictionary as implicit output of r8
Soong was generating proguard_dictionary, but not marking it as an
output, so ninja would fail with:
ninja: error: 'out/soong/.intermediates/bootable/recovery/tools/recovery_l10n/RecoveryLocalizer/android_common/proguard_dictionary', needed by 'out/target/common/obj/APPS/RecoveryLocalizer_intermediates/proguard_dictionary', missing and no known rule to make it
Fixes: 78770148
Test: mmma bootable/recovery/tools/recovery_l10n
Change-Id: I956f92519ea81d4fb1322114214099d46d734906
diff --git a/java/dex.go b/java/dex.go
index 66e71b5..642dee4 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -238,14 +238,16 @@
if useR8 {
// TODO(ccross): if this is an instrumentation test of an obfuscated app, use the
// dictionary of the app and move the app from libraryjars to injars.
- j.proguardDictionary = android.PathForModuleOut(ctx, "proguard_dictionary")
+ proguardDictionary := android.PathForModuleOut(ctx, "proguard_dictionary")
+ j.proguardDictionary = proguardDictionary
r8Flags, r8Deps := j.r8Flags(ctx, flags)
ctx.Build(pctx, android.BuildParams{
- Rule: r8,
- Description: "r8",
- Output: javalibJar,
- Input: classesJar,
- Implicits: r8Deps,
+ Rule: r8,
+ Description: "r8",
+ Output: javalibJar,
+ ImplicitOutput: proguardDictionary,
+ Input: classesJar,
+ Implicits: r8Deps,
Args: map[string]string{
"dxFlags": strings.Join(dxFlags, " "),
"r8Flags": strings.Join(r8Flags, " "),