Add {.aar} support for android_library

Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401
This commit is contained in:
Saeid Farivar Asanjan 2021-09-14 18:40:19 +00:00
parent 04e0a1551d
commit 1fca301bd2

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
}