Merge "bp2build: add allowlist for package-level conversions."
This commit is contained in:
@@ -158,12 +158,17 @@ func (ctx *TestContext) FinalDepsMutators(f RegisterMutatorFunc) {
|
||||
ctx.finalDeps = append(ctx.finalDeps, f)
|
||||
}
|
||||
|
||||
func (ctx *TestContext) RegisterBp2BuildConfig(config Bp2BuildConfig) {
|
||||
ctx.config.bp2buildPackageConfig = config
|
||||
}
|
||||
|
||||
// RegisterBp2BuildMutator registers a BazelTargetModule mutator for converting a module
|
||||
// type to the equivalent Bazel target.
|
||||
func (ctx *TestContext) RegisterBp2BuildMutator(moduleType string, m func(TopDownMutatorContext)) {
|
||||
f := func(ctx RegisterMutatorsContext) {
|
||||
ctx.TopDown(moduleType, m)
|
||||
}
|
||||
ctx.config.bp2buildModuleTypeConfig[moduleType] = true
|
||||
ctx.bp2buildMutators = append(ctx.bp2buildMutators, f)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user