diff --git a/apex/apex_test.go b/apex/apex_test.go index a69faeb58..7ae9ed720 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -7276,6 +7276,28 @@ func TestAppSetBundlePrebuilt(t *testing.T) { android.AssertStringEquals(t, "myapex input", extractorOutput, copiedApex.Input.String()) } +func TestApexSetApksModuleAssignment(t *testing.T) { + ctx := testApex(t, ` + apex_set { + name: "myapex", + set: ":myapex_apks_file", + } + + filegroup { + name: "myapex_apks_file", + srcs: ["myapex.apks"], + } + `) + + m := ctx.ModuleForTests("myapex.apex.extractor", "android_common") + + // Check that the extractor produces the correct apks file from the input module + extractorOutput := "out/soong/.intermediates/myapex.apex.extractor/android_common/extracted/myapex.apks" + extractedApex := m.Output(extractorOutput) + + android.AssertArrayString(t, "extractor input", []string{"myapex.apks"}, extractedApex.Inputs.Strings()) +} + func testNoUpdatableJarsInBootImage(t *testing.T, errmsg string, preparer android.FixturePreparer, fragments ...java.ApexVariantReference) { t.Helper() diff --git a/apex/prebuilt.go b/apex/prebuilt.go index 172a2012d..25ae5bf7c 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -840,17 +840,17 @@ type ApexSet struct { type ApexExtractorProperties struct { // the .apks file path that contains prebuilt apex files to be extracted. - Set *string + Set *string `android:"path"` Sanitized struct { None struct { - Set *string + Set *string `android:"path"` } Address struct { - Set *string + Set *string `android:"path"` } Hwaddress struct { - Set *string + Set *string `android:"path"` } }