Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 504b300f authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Dedup prebuilt mutator registration" am: 82f4f997 am: 849e8f75 am: e05577b9

Change-Id: I094959ab23674cafcc40455f5ea1c062085c75f1
parents 598e0885 e05577b9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,11 @@ import (
// This file implements common functionality for handling modules that may exist as prebuilts,
// source, or both.

func RegisterPrebuiltMutators(ctx RegistrationContext) {
	ctx.PreArchMutators(RegisterPrebuiltsPreArchMutators)
	ctx.PostDepsMutators(RegisterPrebuiltsPostDepsMutators)
}

type prebuiltDependencyTag struct {
	blueprint.BaseDependencyTag
}
+1 −2
Original line number Diff line number Diff line
@@ -141,8 +141,7 @@ func TestPrebuilts(t *testing.T) {
			config := TestConfig(buildDir, nil, bp, fs)

			ctx := NewTestContext()
			ctx.PreArchMutators(RegisterPrebuiltsPreArchMutators)
			ctx.PostDepsMutators(RegisterPrebuiltsPostDepsMutators)
			RegisterPrebuiltMutators(ctx)
			ctx.RegisterModuleType("filegroup", FileGroupFactory)
			ctx.RegisterModuleType("prebuilt", newPrebuiltModule)
			ctx.RegisterModuleType("source", newSourceModule)
+1 −7
Original line number Diff line number Diff line
@@ -305,16 +305,10 @@ func testApexContext(t *testing.T, bp string, handlers ...testCustomizer) (*andr
	java.RegisterAppBuildComponents(ctx)

	ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
	ctx.PreArchMutators(func(ctx android.RegisterMutatorsContext) {
		ctx.BottomUp("prebuilts", android.PrebuiltMutator).Parallel()
	})
	android.RegisterPrebuiltMutators(ctx)
	ctx.PreDepsMutators(RegisterPreDepsMutators)
	ctx.PostDepsMutators(android.RegisterOverridePostDepsMutators)
	ctx.PostDepsMutators(RegisterPostDepsMutators)
	ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
		ctx.TopDown("prebuilt_select", android.PrebuiltSelectModuleMutator).Parallel()
		ctx.BottomUp("prebuilt_postdeps", android.PrebuiltPostDepsMutator).Parallel()
	})

	ctx.Register(config)

+1 −2
Original line number Diff line number Diff line
@@ -74,8 +74,7 @@ func TestPrebuilt(t *testing.T) {

	RegisterPrebuiltBuildComponents(ctx)

	ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators)
	ctx.PostDepsMutators(android.RegisterPrebuiltsPostDepsMutators)
	android.RegisterPrebuiltMutators(ctx)

	ctx.Register(config)

+1 −2
Original line number Diff line number Diff line
@@ -74,8 +74,7 @@ func testContext() *android.TestContext {
	RegisterDocsBuildComponents(ctx)
	RegisterStubsBuildComponents(ctx)
	RegisterSdkLibraryBuildComponents(ctx)
	ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators)
	ctx.PreArchMutators(android.RegisterPrebuiltsPostDepsMutators)
	android.RegisterPrebuiltMutators(ctx)
	ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)

	RegisterPrebuiltApisBuildComponents(ctx)
Loading