Fix override_android_app dependency issues.
This change fixes an issue where an android_test could not depened on an
override_android_app or an android_app overridden by one by moving all
override processing to post-deps and forwarding incoming dependencies on
override_android_apps to base android_app modules
Fixes: 132447700
Test: app_test.go
Change-Id: I4ac593be661f541f5ea9823ef97373bee4b186f9
diff --git a/java/app.go b/java/app.go
index db9c5dd..9f37836 100644
--- a/java/app.go
+++ b/java/app.go
@@ -163,7 +163,9 @@
}
ctx.AddFarVariationDependencies(variation, tag, a.appProperties.Jni_libs...)
}
+}
+func (a *AndroidApp) OverridablePropertiesDepsMutator(ctx android.BottomUpMutatorContext) {
cert := android.SrcIsModule(a.getCertString(ctx))
if cert != "" {
ctx.AddDependency(ctx.Module(), certificateTag, cert)
@@ -632,7 +634,7 @@
m := &OverrideAndroidApp{}
m.AddProperties(&overridableAppProperties{})
- android.InitAndroidModule(m)
+ android.InitAndroidMultiTargetsArchModule(m, android.DeviceSupported, android.MultilibCommon)
android.InitOverrideModule(m)
return m
}