Support owner property
Support owner properties in Android.bp files and propagate the value
to make using LOCAL_MODULE_OWNER.
Bug: 36413696
Test: builds
Change-Id: Iac1cf7f2a14c9e3e6d85d6e09d5adb08a7078d00
diff --git a/android/androidmk.go b/android/androidmk.go
index ec3abe1..d55cdca 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -232,6 +232,9 @@
if amod.commonProperties.Proprietary {
fmt.Fprintln(w, "LOCAL_PROPRIETARY_MODULE := true")
}
+ if amod.commonProperties.Owner != "" {
+ fmt.Fprintln(w, "LOCAL_MODULE_OWNER :=", amod.commonProperties.Owner)
+ }
}
if host {
diff --git a/android/module.go b/android/module.go
index 6474e47..cc420fb 100644
--- a/android/module.go
+++ b/android/module.go
@@ -137,6 +137,9 @@
// whether this is a proprietary vendor module, and should be installed into /vendor
Proprietary bool
+ // vendor who owns this module
+ Owner string
+
// *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
// file
Logtags []string
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 8d46a78..75c3eec 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -68,6 +68,7 @@
"LOCAL_MODULE_RELATIVE_PATH": "relative_install_path",
"LOCAL_PROTOC_OPTIMIZE_TYPE": "proto.type",
"LOCAL_HEADER_LIBRARIES": "header_libs",
+ "LOCAL_MODULE_OWNER": "owner",
})
addStandardProperties(bpparser.ListType,
map[string]string{