Revert "Include proguard flag files from transitive java_library deps"
This reverts commit 9c54f032b9
.
Reason for revert: b/262940536
Bug: b/262940536
Change-Id: I8140eacc7ca8716f799561412cb5cef29df35d29
This commit is contained in:
22
java/aar.go
22
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)
|
||||
|
||||
|
Reference in New Issue
Block a user