Revert "Deduplicate APEX variants that would build identically"
This reverts commit d6b2525b003b5620b3745a79dce56093173504f5.
Reason for revert: <Breaks tests - confirmed by Forrest: b/165188843>
Change-Id: I7cb68cb87522415004390c0672dc774e0067b122
diff --git a/apex/apex.go b/apex/apex.go
index 84a1e75..1267ec7 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -669,7 +669,6 @@
func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
ctx.TopDown("apex_deps", apexDepsMutator).Parallel()
- ctx.BottomUp("apex_unique", apexUniqueVariationsMutator).Parallel()
ctx.BottomUp("apex", apexMutator).Parallel()
ctx.BottomUp("apex_flattened", apexFlattenedMutator).Parallel()
ctx.BottomUp("apex_uses", apexUsesMutator).Parallel()
@@ -689,9 +688,7 @@
apexInfo := android.ApexInfo{
ApexVariationName: mctx.ModuleName(),
MinSdkVersion: a.minSdkVersion(mctx),
- RequiredSdks: a.RequiredSdks(),
Updatable: a.Updatable(),
- InApexes: []string{mctx.ModuleName()},
}
useVndk := a.SocSpecific() || a.DeviceSpecific() || (a.ProductSpecific() && mctx.Config().EnforceProductPartitionInterface())
@@ -724,17 +721,6 @@
})
}
-func apexUniqueVariationsMutator(mctx android.BottomUpMutatorContext) {
- if !mctx.Module().Enabled() {
- return
- }
- if am, ok := mctx.Module().(android.ApexModule); ok {
- // Check if any dependencies use unique apex variations. If so, use unique apex variations
- // for this module.
- am.UpdateUniqueApexVariationsForDeps(mctx)
- }
-}
-
// mark if a module cannot be available to platform. A module cannot be available
// to platform if 1) it is explicitly marked as not available (i.e. "//apex_available:platform"
// is absent) or 2) it depends on another module that isn't (or can't be) available to platform
@@ -1811,7 +1797,7 @@
}
// Check for the indirect dependencies if it is considered as part of the APEX
- if android.InList(ctx.ModuleName(), am.InApexes()) {
+ if am.ApexVariationName() != "" {
return do(ctx, parent, am, false /* externalDep */)
}