Add {.aar} support for android_library

Bug: 199548380
Test: manually
Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401
This commit is contained in:
Saeid Farivar Asanjan 2021-09-14 18:40:19 +00:00
parent 495a34493a
commit bee6271909
1 changed files with 12 additions and 0 deletions

View File

@ -486,6 +486,18 @@ type AndroidLibrary struct {
exportedStaticPackages android.Paths
}
var _ android.OutputFileProducer = (*AndroidLibrary)(nil)
// For OutputFileProducer interface
func (a *AndroidLibrary) OutputFiles(tag string) (android.Paths, error) {
switch tag {
case ".aar":
return []android.Path{a.aarFile}, nil
default:
return a.Library.OutputFiles(tag)
}
}
func (a *AndroidLibrary) ExportedProguardFlagFiles() android.Paths {
return a.exportedProguardFlagFiles
}