Tag apex_set's 'set' config with `android:"path"`
This allows apex_set's set config to use other soong modules as a dependency
Bug:249169376
Change-Id: I8da20c6f474328d63d9aa3811f94e3e04b89ea4c
Test: Added a test case to check soong module assignment to the set field of an apks_set rule
diff --git a/apex/apex_test.go b/apex/apex_test.go
index a69faeb..7ae9ed7 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -7276,6 +7276,28 @@
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()