Build proguard zips in soong-only builds
This builds the zips but doesn't dist them, I'll do that in a followup.
Bug: 395160816
Test: Diffed proguard-dict.zip proguard-usage.zip and proguard-dict-mapping.textproto between soong and make
Change-Id: Ic112427e4a2fdaf92a1d0a96d0f1c100b57be37a
diff --git a/java/app.go b/java/app.go
index 9b10bf3..7580db4 100644
--- a/java/app.go
+++ b/java/app.go
@@ -452,6 +452,16 @@
android.SetProvider(ctx, AppInfoProvider, appInfo)
a.requiredModuleNames = a.getRequiredModuleNames(ctx)
+
+ if a.dexer.proguardDictionary.Valid() {
+ android.SetProvider(ctx, ProguardProvider, ProguardInfo{
+ ModuleName: ctx.ModuleName(),
+ Class: "APPS",
+ ProguardDictionary: a.dexer.proguardDictionary.Path(),
+ ProguardUsageZip: a.dexer.proguardUsageZip.Path(),
+ ClassesJar: a.implementationAndResourcesJar,
+ })
+ }
}
func (a *AndroidApp) getRequiredModuleNames(ctx android.ModuleContext) []string {