diff options
| author | 2025-01-08 13:35:55 -0800 | |
|---|---|---|
| committer | 2025-01-08 13:35:55 -0800 | |
| commit | 44670268657b495ea803001cb22b1abd70297a6a (patch) | |
| tree | e908ac1afc722d105e5c6040045125c8281f4f84 /java/java.go | |
| parent | 0149d1bab2d8ff9fc4eee979e63cc59543be14f6 (diff) | |
| parent | 172c56d662f5aaa832cd4fbe33cd4e1083adf44c (diff) | |
Merge "Extract proguard rules found in imported JAR archives" into main
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index a975ca61c..0ab344066 100644 --- a/java/java.go +++ b/java/java.go @@ -2827,6 +2827,23 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { outputFile = combinedJar } + proguardFlags := android.PathForModuleOut(ctx, "proguard_flags") + TransformJarToR8Rules(ctx, proguardFlags, outputFile) + + transitiveProguardFlags, transitiveUnconditionalExportedFlags := collectDepProguardSpecInfo(ctx) + android.SetProvider(ctx, ProguardSpecInfoProvider, ProguardSpecInfo{ + ProguardFlagsFiles: depset.New[android.Path]( + depset.POSTORDER, + android.Paths{proguardFlags}, + transitiveProguardFlags, + ), + UnconditionallyExportedProguardFlags: depset.New[android.Path]( + depset.POSTORDER, + nil, + transitiveUnconditionalExportedFlags, + ), + }) + // Save the output file with no relative path so that it doesn't end up in a subdirectory when used as a resource. // Also strip the relative path from the header output file so that the reuseImplementationJarAsHeaderJar check // in a module that depends on this module considers them equal. |