Loading apex/apex_test.go +3 −0 Original line number Diff line number Diff line Loading @@ -3428,6 +3428,7 @@ func TestApexWithAppImports(t *testing.T) { dex_preopt: { enabled: false, }, apex_available: ["myapex"], } android_app_import { Loading @@ -3439,6 +3440,7 @@ func TestApexWithAppImports(t *testing.T) { enabled: false, }, filename: "AwesomePrebuiltAppFooPriv.apk", apex_available: ["myapex"], } `) Loading Loading @@ -3480,6 +3482,7 @@ func TestApexWithAppImportsPrefer(t *testing.T) { filename: "AppFooPrebuilt.apk", presigned: true, prefer: true, apex_available: ["myapex"], } `, withFiles(map[string][]byte{ "AppFooPrebuilt.apk": nil, Loading java/androidmk.go +5 −0 Original line number Diff line number Diff line Loading @@ -626,6 +626,11 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries { } func (a *AndroidAppImport) AndroidMkEntries() []android.AndroidMkEntries { if !a.IsForPlatform() { // The non-platform variant is placed inside APEX. No reason to // make it available to Make. return nil } return []android.AndroidMkEntries{android.AndroidMkEntries{ Class: "APPS", OutputFile: android.OptionalPathForPath(a.outputFile), Loading java/app.go +13 −1 Original line number Diff line number Diff line Loading @@ -986,6 +986,7 @@ func OverrideAndroidTestModuleFactory() android.Module { type AndroidAppImport struct { android.ModuleBase android.DefaultableModuleBase android.ApexModuleBase prebuilt android.Prebuilt properties AndroidAppImportProperties Loading Loading @@ -1223,7 +1224,9 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext // TODO: Optionally compress the output apk. if a.IsForPlatform() { a.installPath = ctx.InstallFile(installDir, apkFilename, a.outputFile) } // TODO: androidmk converter jni libs } Loading Loading @@ -1274,6 +1277,13 @@ func (a *AndroidAppImport) Privileged() bool { return Bool(a.properties.Privileged) } func (a *AndroidAppImport) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { // android_app_import might have extra dependencies via uses_libs property. // Don't track the dependency as we don't automatically add those libraries // to the classpath. It should be explicitly added to java_libs property of APEX return false } func createVariantGroupType(variants []string, variantGroupName string) reflect.Type { props := reflect.TypeOf((*AndroidAppImportProperties)(nil)) Loading Loading @@ -1320,6 +1330,7 @@ func AndroidAppImportFactory() android.Module { module.processVariants(ctx) }) android.InitApexModule(module) InitJavaModule(module, android.DeviceSupported) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") Loading Loading @@ -1357,6 +1368,7 @@ func AndroidTestImportFactory() android.Module { module.processVariants(ctx) }) android.InitApexModule(module) InitJavaModule(module, android.DeviceSupported) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") Loading Loading
apex/apex_test.go +3 −0 Original line number Diff line number Diff line Loading @@ -3428,6 +3428,7 @@ func TestApexWithAppImports(t *testing.T) { dex_preopt: { enabled: false, }, apex_available: ["myapex"], } android_app_import { Loading @@ -3439,6 +3440,7 @@ func TestApexWithAppImports(t *testing.T) { enabled: false, }, filename: "AwesomePrebuiltAppFooPriv.apk", apex_available: ["myapex"], } `) Loading Loading @@ -3480,6 +3482,7 @@ func TestApexWithAppImportsPrefer(t *testing.T) { filename: "AppFooPrebuilt.apk", presigned: true, prefer: true, apex_available: ["myapex"], } `, withFiles(map[string][]byte{ "AppFooPrebuilt.apk": nil, Loading
java/androidmk.go +5 −0 Original line number Diff line number Diff line Loading @@ -626,6 +626,11 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries { } func (a *AndroidAppImport) AndroidMkEntries() []android.AndroidMkEntries { if !a.IsForPlatform() { // The non-platform variant is placed inside APEX. No reason to // make it available to Make. return nil } return []android.AndroidMkEntries{android.AndroidMkEntries{ Class: "APPS", OutputFile: android.OptionalPathForPath(a.outputFile), Loading
java/app.go +13 −1 Original line number Diff line number Diff line Loading @@ -986,6 +986,7 @@ func OverrideAndroidTestModuleFactory() android.Module { type AndroidAppImport struct { android.ModuleBase android.DefaultableModuleBase android.ApexModuleBase prebuilt android.Prebuilt properties AndroidAppImportProperties Loading Loading @@ -1223,7 +1224,9 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext // TODO: Optionally compress the output apk. if a.IsForPlatform() { a.installPath = ctx.InstallFile(installDir, apkFilename, a.outputFile) } // TODO: androidmk converter jni libs } Loading Loading @@ -1274,6 +1277,13 @@ func (a *AndroidAppImport) Privileged() bool { return Bool(a.properties.Privileged) } func (a *AndroidAppImport) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { // android_app_import might have extra dependencies via uses_libs property. // Don't track the dependency as we don't automatically add those libraries // to the classpath. It should be explicitly added to java_libs property of APEX return false } func createVariantGroupType(variants []string, variantGroupName string) reflect.Type { props := reflect.TypeOf((*AndroidAppImportProperties)(nil)) Loading Loading @@ -1320,6 +1330,7 @@ func AndroidAppImportFactory() android.Module { module.processVariants(ctx) }) android.InitApexModule(module) InitJavaModule(module, android.DeviceSupported) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") Loading Loading @@ -1357,6 +1368,7 @@ func AndroidTestImportFactory() android.Module { module.processVariants(ctx) }) android.InitApexModule(module) InitJavaModule(module, android.DeviceSupported) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") Loading