bp2build: framework for generating BazelTargetModules.

This CL creates the framework necessary for generating
BazelTargetModules from regular Soong Android modules.
BazelTargetModules are code-generated into Bazel targets in BUILD files.

See the follow-up CL for examples of creating filegroup/genrule
BazelTargetModules.

Test: GENERATE_BAZEL_FILES=true m nothing # creates out/soong/bp2build
with no BUILD files, because there are no BazelTargetModules in the
module graph.

Change-Id: I33a96365bd439043b13af6db9e439592e9983188
This commit is contained in:
Jingwen Chen
2020-12-14 08:25:34 -05:00
parent de1357378b
commit 7385067640
15 changed files with 295 additions and 51 deletions

View File

@@ -115,7 +115,7 @@ func (ctx *Context) RegisterForBazelConversion() {
ctx.RegisterSingletonType(t.name, SingletonFactoryAdaptor(ctx, t.factory))
}
registerMutatorsForBazelConversion(ctx.Context)
RegisterMutatorsForBazelConversion(ctx.Context, bp2buildMutators)
}
// Register the pipeline of singletons, module types, and mutators for