From 28bf7ee2adf6a87849445f8c65cc0de41a9ccf3b Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 12 May 2021 16:41:35 +0100 Subject: [PATCH] Move markPlatformAvailability mutator before apexMutator This will allow the apexMutator to use the NotAvailableForPlatform() method initialized by the markPlatformAvailability mutator to help determine whether to create a platform variant or not. Bug: 187910671 Test: m droid Change-Id: I745b4428afc68e7ca4cd2f4cbe810b8df1eebdb7 --- apex/apex.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apex/apex.go b/apex/apex.go index c8e6cc86b..0b8cb13cc 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -69,10 +69,12 @@ func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) { ctx.BottomUp("apex_unique", apexUniqueVariationsMutator).Parallel() ctx.BottomUp("apex_test_for_deps", apexTestForDepsMutator).Parallel() ctx.BottomUp("apex_test_for", apexTestForMutator).Parallel() + // Run mark_platform_availability before the apexMutator as the apexMutator needs to know whether + // it should create a platform variant. + ctx.BottomUp("mark_platform_availability", markPlatformAvailability).Parallel() ctx.BottomUp("apex", apexMutator).Parallel() ctx.BottomUp("apex_directly_in_any", apexDirectlyInAnyMutator).Parallel() ctx.BottomUp("apex_flattened", apexFlattenedMutator).Parallel() - ctx.BottomUp("mark_platform_availability", markPlatformAvailability).Parallel() } type apexBundleProperties struct {