Loading android/mutator.go +9 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,14 @@ func RegisterMutatorsForBazelConversion(ctx *Context, preArchMutators, depsMutat mctx.mutators.registerAll(ctx) } func registerMutators(ctx *Context, preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc) { // collateGloballyRegisteredMutators constructs the list of mutators that have been registered // with the InitRegistrationContext and will be used at runtime. func collateGloballyRegisteredMutators() sortableComponents { return collateRegisteredMutators(preArch, preDeps, postDeps, finalDeps) } // collateRegisteredMutators constructs a single list of mutators from the separate lists. func collateRegisteredMutators(preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc) sortableComponents { mctx := ®isterMutatorsContext{} register := func(funcs []RegisterMutatorFunc) { Loading @@ -89,7 +96,7 @@ func registerMutators(ctx *Context, preArch, preDeps, postDeps, finalDeps []Regi mctx.finalPhase = true register(finalDeps) mctx.mutators.registerAll(ctx) return mctx.mutators } type registerMutatorsContext struct { Loading android/register.go +2 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ func (ctx *Context) Register() { singletons.registerAll(ctx) registerMutators(ctx, preArch, preDeps, postDeps, finalDeps) mutators := collateGloballyRegisteredMutators() mutators.registerAll(ctx) ctx.RegisterSingletonType("bazeldeps", SingletonFactoryAdaptor(ctx, BazelSingleton)) Loading android/testing.go +2 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,8 @@ func (ctx *TestContext) DepsBp2BuildMutators(f RegisterMutatorFunc) { } func (ctx *TestContext) Register() { registerMutators(ctx.Context, ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.finalDeps) mutators := collateRegisteredMutators(ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.finalDeps) mutators.registerAll(ctx.Context) ctx.RegisterSingletonType("env", EnvSingleton) } Loading Loading
android/mutator.go +9 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,14 @@ func RegisterMutatorsForBazelConversion(ctx *Context, preArchMutators, depsMutat mctx.mutators.registerAll(ctx) } func registerMutators(ctx *Context, preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc) { // collateGloballyRegisteredMutators constructs the list of mutators that have been registered // with the InitRegistrationContext and will be used at runtime. func collateGloballyRegisteredMutators() sortableComponents { return collateRegisteredMutators(preArch, preDeps, postDeps, finalDeps) } // collateRegisteredMutators constructs a single list of mutators from the separate lists. func collateRegisteredMutators(preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc) sortableComponents { mctx := ®isterMutatorsContext{} register := func(funcs []RegisterMutatorFunc) { Loading @@ -89,7 +96,7 @@ func registerMutators(ctx *Context, preArch, preDeps, postDeps, finalDeps []Regi mctx.finalPhase = true register(finalDeps) mctx.mutators.registerAll(ctx) return mctx.mutators } type registerMutatorsContext struct { Loading
android/register.go +2 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ func (ctx *Context) Register() { singletons.registerAll(ctx) registerMutators(ctx, preArch, preDeps, postDeps, finalDeps) mutators := collateGloballyRegisteredMutators() mutators.registerAll(ctx) ctx.RegisterSingletonType("bazeldeps", SingletonFactoryAdaptor(ctx, BazelSingleton)) Loading
android/testing.go +2 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,8 @@ func (ctx *TestContext) DepsBp2BuildMutators(f RegisterMutatorFunc) { } func (ctx *TestContext) Register() { registerMutators(ctx.Context, ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.finalDeps) mutators := collateRegisteredMutators(ctx.preArch, ctx.preDeps, ctx.postDeps, ctx.finalDeps) mutators.registerAll(ctx.Context) ctx.RegisterSingletonType("env", EnvSingleton) } Loading