fix: required property doesn't track deps to java, apex, ...
This change fixes a bug that the required property doesn't track
dependencies to modules whose arch is common.
Bug: 321000103
Bug: 321626681
Test: go test ./...
Change-Id: I3d2b3ad8cb2a9f1c5c3d5345bf05402a787f011a
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 5c780f8..3ce5d4e 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -23,6 +23,7 @@
"android/soong/bpf"
"android/soong/cc"
"android/soong/etc"
+ "android/soong/java"
"android/soong/phony"
"github.com/google/blueprint/proptools"
@@ -34,9 +35,12 @@
var fixture = android.GroupFixturePreparers(
android.PrepareForIntegrationTestWithAndroid,
+ android.PrepareForTestWithAndroidBuildComponents,
bpf.PrepareForTestWithBpf,
- etc.PrepareForTestWithPrebuiltEtc,
cc.PrepareForIntegrationTestWithCc,
+ etc.PrepareForTestWithPrebuiltEtc,
+ java.PrepareForTestWithJavaBuildComponents,
+ java.PrepareForTestWithJavaDefaultModules,
phony.PrepareForTestWithPhony,
PrepareForTestWithFilesystemBuildComponents,
)
@@ -88,12 +92,21 @@
phony {
name: "phony",
- required: ["libquz"],
+ required: [
+ "libquz",
+ "myapp",
+ ],
}
cc_library {
name: "libquz",
}
+
+ android_app {
+ name: "myapp",
+ platform_apis: true,
+ installable: true,
+ }
`)
// produces "myfilesystem.img"
@@ -101,6 +114,7 @@
fs := result.ModuleForTests("myfilesystem", "android_common").Module().(*filesystem)
expected := []string{
+ "app/myapp/myapp.apk",
"bin/foo",
"lib/libbar.so",
"lib64/libbar.so",