diff options
Diffstat (limited to 'java/app.go')
-rw-r--r-- | java/app.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/java/app.go b/java/app.go index dd83a0a7..1fdce129 100644 --- a/java/app.go +++ b/java/app.go @@ -63,6 +63,10 @@ type AndroidApp struct { appProperties appProperties } +func (a *AndroidApp) ExportedProguardFlagFiles() android.Paths { + return nil +} + var _ AndroidLibraryDependency = (*AndroidApp)(nil) type certificate struct { @@ -116,8 +120,17 @@ func (a *AndroidApp) GenerateAndroidBuildActions(ctx android.ModuleContext) { // apps manifests are handled by aapt, don't let Module see them a.properties.Manifest = nil - a.Module.extraProguardFlagFiles = append(a.Module.extraProguardFlagFiles, - a.proguardOptionsFile) + var staticLibProguardFlagFiles android.Paths + ctx.VisitDirectDeps(func(m android.Module) { + if lib, ok := m.(AndroidLibraryDependency); ok && ctx.OtherModuleDependencyTag(m) == staticLibTag { + staticLibProguardFlagFiles = append(staticLibProguardFlagFiles, lib.ExportedProguardFlagFiles()...) + } + }) + + staticLibProguardFlagFiles = android.FirstUniquePaths(staticLibProguardFlagFiles) + + a.Module.extraProguardFlagFiles = append(a.Module.extraProguardFlagFiles, staticLibProguardFlagFiles...) + a.Module.extraProguardFlagFiles = append(a.Module.extraProguardFlagFiles, a.proguardOptionsFile) if ctx.ModuleName() != "framework-res" { a.Module.compile(ctx, a.aaptSrcJar) |