Merge "Support apps attribute in apex_defaults"
am: 1d1a920794
Change-Id: Ibfa92edacbb7c041d6d1ac01f5a0baf64b9562a3
This commit is contained in:
@@ -488,9 +488,11 @@ type apexBundle struct {
|
|||||||
|
|
||||||
properties apexBundleProperties
|
properties apexBundleProperties
|
||||||
targetProperties apexTargetBundleProperties
|
targetProperties apexTargetBundleProperties
|
||||||
vndkProperties apexVndkProperties
|
|
||||||
overridableProperties overridableProperties
|
overridableProperties overridableProperties
|
||||||
|
|
||||||
|
// specific to apex_vndk modules
|
||||||
|
vndkProperties apexVndkProperties
|
||||||
|
|
||||||
bundleModuleFile android.WritablePath
|
bundleModuleFile android.WritablePath
|
||||||
outputFile android.WritablePath
|
outputFile android.WritablePath
|
||||||
installDir android.InstallPath
|
installDir android.InstallPath
|
||||||
@@ -1278,6 +1280,7 @@ func DefaultsFactory(props ...interface{}) android.Module {
|
|||||||
module.AddProperties(
|
module.AddProperties(
|
||||||
&apexBundleProperties{},
|
&apexBundleProperties{},
|
||||||
&apexTargetBundleProperties{},
|
&apexTargetBundleProperties{},
|
||||||
|
&overridableProperties{},
|
||||||
)
|
)
|
||||||
|
|
||||||
android.InitDefaultsModule(module)
|
android.InitDefaultsModule(module)
|
||||||
|
@@ -532,6 +532,62 @@ func TestBasicApex(t *testing.T) {
|
|||||||
ensureListContains(t, noticeInputs, "custom_notice")
|
ensureListContains(t, noticeInputs, "custom_notice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDefaults(t *testing.T) {
|
||||||
|
ctx, _ := testApex(t, `
|
||||||
|
apex_defaults {
|
||||||
|
name: "myapex-defaults",
|
||||||
|
key: "myapex.key",
|
||||||
|
prebuilts: ["myetc"],
|
||||||
|
native_shared_libs: ["mylib"],
|
||||||
|
java_libs: ["myjar"],
|
||||||
|
apps: ["AppFoo"],
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuilt_etc {
|
||||||
|
name: "myetc",
|
||||||
|
src: "myprebuilt",
|
||||||
|
}
|
||||||
|
|
||||||
|
apex {
|
||||||
|
name: "myapex",
|
||||||
|
defaults: ["myapex-defaults"],
|
||||||
|
}
|
||||||
|
|
||||||
|
apex_key {
|
||||||
|
name: "myapex.key",
|
||||||
|
public_key: "testkey.avbpubkey",
|
||||||
|
private_key: "testkey.pem",
|
||||||
|
}
|
||||||
|
|
||||||
|
cc_library {
|
||||||
|
name: "mylib",
|
||||||
|
system_shared_libs: [],
|
||||||
|
stl: "none",
|
||||||
|
}
|
||||||
|
|
||||||
|
java_library {
|
||||||
|
name: "myjar",
|
||||||
|
srcs: ["foo/bar/MyClass.java"],
|
||||||
|
sdk_version: "none",
|
||||||
|
system_modules: "none",
|
||||||
|
compile_dex: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
android_app {
|
||||||
|
name: "AppFoo",
|
||||||
|
srcs: ["foo/bar/MyClass.java"],
|
||||||
|
sdk_version: "none",
|
||||||
|
system_modules: "none",
|
||||||
|
}
|
||||||
|
`)
|
||||||
|
ensureExactContents(t, ctx, "myapex", []string{
|
||||||
|
"etc/myetc",
|
||||||
|
"javalib/myjar.jar",
|
||||||
|
"lib64/mylib.so",
|
||||||
|
"app/AppFoo/AppFoo.apk",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func TestApexManifest(t *testing.T) {
|
func TestApexManifest(t *testing.T) {
|
||||||
ctx, _ := testApex(t, `
|
ctx, _ := testApex(t, `
|
||||||
apex {
|
apex {
|
||||||
|
Reference in New Issue
Block a user