Add android_app_import.
This is an initial version that handles the most basic cases. Bug: 128610294 Test: app_test.go + prebuilt webview.apk Change-Id: Ic525559aad5612987e50aa75b326b77b23acb716
This commit is contained in:
@@ -590,6 +590,32 @@ func (dstubs *Droidstubs) AndroidMk() android.AndroidMkData {
|
||||
}
|
||||
}
|
||||
|
||||
func (app *AndroidAppImport) AndroidMk() android.AndroidMkData {
|
||||
return android.AndroidMkData{
|
||||
Class: "APPS",
|
||||
OutputFile: android.OptionalPathForPath(app.outputFile),
|
||||
Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk",
|
||||
Extra: []android.AndroidMkExtraFunc{
|
||||
func(w io.Writer, outputFile android.Path) {
|
||||
if Bool(app.properties.Privileged) {
|
||||
fmt.Fprintln(w, "LOCAL_PRIVILEGED_MODULE := true")
|
||||
}
|
||||
if app.certificate != nil {
|
||||
fmt.Fprintln(w, "LOCAL_CERTIFICATE :=", app.certificate.Pem.String())
|
||||
} else {
|
||||
fmt.Fprintln(w, "LOCAL_CERTIFICATE := PRESIGNED")
|
||||
}
|
||||
if len(app.properties.Overrides) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_OVERRIDES_PACKAGES :=", strings.Join(app.properties.Overrides, " "))
|
||||
}
|
||||
if len(app.dexpreopter.builtInstalled) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_SOONG_BUILT_INSTALLED :=", app.dexpreopter.builtInstalled)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func androidMkWriteTestData(data android.Paths, ret *android.AndroidMkData) {
|
||||
var testFiles []string
|
||||
for _, d := range data {
|
||||
|
Reference in New Issue
Block a user