Implement android_app_set module

Bug: 152319766
Test: manual and builtin
Change-Id: Id0877476f9ae23311d92c0b59a9c568140ab4119
Merged-In: Id0877476f9ae23311d92c0b59a9c568140ab4119
This commit is contained in:
Sasha Smundak
2020-04-23 09:49:59 -07:00
committed by Jaewoong Jung
parent 97d511a16d
commit 8539023170
7 changed files with 268 additions and 1 deletions

View File

@@ -595,3 +595,20 @@ func androidMkWriteTestData(data android.Paths, ret *android.AndroidMkData) {
})
}
}
func (apkSet *AndroidAppSet) AndroidMk() android.AndroidMkData {
return android.AndroidMkData{
Class: "APPS",
OutputFile: android.OptionalPathForPath(apkSet.packedOutput),
Include: "$(BUILD_SYSTEM)/soong_android_app_set.mk",
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
if apkSet.Privileged() {
fmt.Fprintln(w, "LOCAL_PRIVILEGED_MODULE := true")
}
fmt.Fprintln(w, "LOCAL_APK_SET_MASTER_FILE := ", apkSet.masterFile)
fmt.Fprintln(w, "LOCAL_OVERRIDES_PACKAGES :=", strings.Join(apkSet.properties.Overrides, " "))
},
},
}
}