aboutsummaryrefslogtreecommitdiffstats
path: root/java/aar.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/aar.go')
-rw-r--r--java/aar.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/java/aar.go b/java/aar.go
index 16d82af4..47676fd9 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -25,6 +25,7 @@ import (
type AndroidLibraryDependency interface {
Dependency
ExportPackage() android.Path
+ ExportedProguardFlagFiles() android.Paths
}
func init() {
@@ -247,6 +248,12 @@ type AndroidLibrary struct {
androidLibraryProperties androidLibraryProperties
aarFile android.WritablePath
+
+ exportedProguardFlagFiles android.Paths
+}
+
+func (a *AndroidLibrary) ExportedProguardFlagFiles() android.Paths {
+ return a.exportedProguardFlagFiles
}
var _ AndroidLibraryDependency = (*AndroidLibrary)(nil)
@@ -279,6 +286,14 @@ func (a *AndroidLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
BuildAAR(ctx, a.aarFile, a.outputFile, a.manifestPath, a.rTxt, res)
ctx.CheckbuildFile(a.aarFile)
}
+
+ ctx.VisitDirectDeps(func(m android.Module) {
+ if lib, ok := m.(AndroidLibraryDependency); ok && ctx.OtherModuleDependencyTag(m) == staticLibTag {
+ a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles, lib.ExportedProguardFlagFiles()...)
+ }
+ })
+
+ a.exportedProguardFlagFiles = android.FirstUniquePaths(a.exportedProguardFlagFiles)
}
func AndroidLibraryFactory() android.Module {
@@ -327,6 +342,10 @@ func (a *AARImport) ExportPackage() android.Path {
return a.exportPackage
}
+func (a *AARImport) ExportedProguardFlagFiles() android.Paths {
+ return android.Paths{a.proguardFlags}
+}
+
func (a *AARImport) Prebuilt() *android.Prebuilt {
return &a.prebuilt
}