Merge "Remove unused property"
am: 491ace3c0a
Change-Id: Iea675b40d041034f2fd9f90642cf43b21bc0f2e1
This commit is contained in:
commit
3181870d1f
1 changed files with 13 additions and 0 deletions
|
@ -130,6 +130,9 @@ func rewriteIncorrectAndroidmkPrebuilts(tree *parser.File) error {
|
|||
case ".aar":
|
||||
renameProperty(mod, "srcs", "aars")
|
||||
mod.Type = "android_library_import"
|
||||
|
||||
// An android_library_import doesn't get installed, so setting "installable = false" isn't supported
|
||||
removeProperty(mod, "installable")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,3 +198,13 @@ func renameProperty(mod *parser.Module, from, to string) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeProperty(mod *parser.Module, propertyName string) {
|
||||
newList := make([]*parser.Property, 0, len(mod.Properties))
|
||||
for _, prop := range mod.Properties {
|
||||
if prop.Name != propertyName {
|
||||
newList = append(newList, prop)
|
||||
}
|
||||
}
|
||||
mod.Properties = newList
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue