summaryrefslogtreecommitdiff
path: root/java/aar.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2022-12-17 03:14:10 +0000
committer Colin Cross <ccross@android.com> 2022-12-17 03:15:22 +0000
commit6f7e288fb5ea2fb01d9093fd57081a82c09a6618 (patch)
tree6f57fcc1b175a5d68259eb20218552b98946bef7 /java/aar.go
parent9c54f032b9dbef63b9ef235c2219a4e9124f8891 (diff)
Revert "Include proguard flag files from transitive java_library deps"
This reverts commit 9c54f032b9dbef63b9ef235c2219a4e9124f8891. Reason for revert: b/262940536 Bug: b/262940536 Change-Id: I8140eacc7ca8716f799561412cb5cef29df35d29
Diffstat (limited to 'java/aar.go')
-rw-r--r--java/aar.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/java/aar.go b/java/aar.go
index eba8a4105..6261f2974 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -29,8 +29,8 @@ import (
)
type AndroidLibraryDependency interface {
- LibraryDependency
ExportPackage() android.Path
+ ExportedProguardFlagFiles() android.Paths
ExportedRRODirs() []rroDir
ExportedStaticPackages() android.Paths
ExportedManifests() android.Paths
@@ -498,7 +498,8 @@ type AndroidLibrary struct {
aarFile android.WritablePath
- exportedStaticPackages android.Paths
+ exportedProguardFlagFiles android.Paths
+ exportedStaticPackages android.Paths
}
var _ android.OutputFileProducer = (*AndroidLibrary)(nil)
@@ -513,6 +514,10 @@ func (a *AndroidLibrary) OutputFiles(tag string) (android.Paths, error) {
}
}
+func (a *AndroidLibrary) ExportedProguardFlagFiles() android.Paths {
+ return a.exportedProguardFlagFiles
+}
+
func (a *AndroidLibrary) ExportedStaticPackages() android.Paths {
return a.exportedStaticPackages
}
@@ -561,16 +566,13 @@ func (a *AndroidLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles,
android.PathsForModuleSrc(ctx, a.dexProperties.Optimize.Proguard_flags_files)...)
ctx.VisitDirectDeps(func(m android.Module) {
- if ctx.OtherModuleDependencyTag(m) == staticLibTag {
- if lib, ok := m.(LibraryDependency); ok {
- a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles, lib.ExportedProguardFlagFiles()...)
- }
- if alib, ok := m.(AndroidLibraryDependency); ok {
- a.exportedStaticPackages = append(a.exportedStaticPackages, alib.ExportPackage())
- a.exportedStaticPackages = append(a.exportedStaticPackages, alib.ExportedStaticPackages()...)
- }
+ if lib, ok := m.(AndroidLibraryDependency); ok && ctx.OtherModuleDependencyTag(m) == staticLibTag {
+ a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles, lib.ExportedProguardFlagFiles()...)
+ a.exportedStaticPackages = append(a.exportedStaticPackages, lib.ExportPackage())
+ a.exportedStaticPackages = append(a.exportedStaticPackages, lib.ExportedStaticPackages()...)
}
})
+
a.exportedProguardFlagFiles = android.FirstUniquePaths(a.exportedProguardFlagFiles)
a.exportedStaticPackages = android.FirstUniquePaths(a.exportedStaticPackages)