Always merge build files

Previous behavior:

- Packge not listed in bp2buildKeepExistingBuildFile:
    - Use bp2build generated build file
- Package listed in bp2buildKeepExistingBuildFile:
    - Use handcrafted build file even if there were allowlisted bp2build
      modules in the same package.
- Package listed in bp2buildKeepExistingBuildFile and a soong module has
  a bp2build: { label } attribute:
    - Merge the handcrafted and bp2build generated build files

New behavior:

- Packge not listed in bp2buildKeepExistingBuildFile:
    - Use bp2build generated build file
- Package listed in bp2buildKeepExistingBuildFile:
    - Merge with bp2build generated build file.

Bug: 234167862
Test: ./build/bazel/ci/bp2build.sh
Change-Id: Ifbaf4f8f0f5158b5b2bd6d534eb2311e2e5f399b
This commit is contained in:
Cole Faust
2022-08-23 15:29:05 -07:00
parent f9f9ed7cf1
commit 324a92e404
9 changed files with 171 additions and 148 deletions

View File

@@ -213,8 +213,8 @@ func (ctx *TestContext) FinalDepsMutators(f RegisterMutatorFunc) {
ctx.finalDeps = append(ctx.finalDeps, f)
}
func (ctx *TestContext) RegisterBp2BuildConfig(config bp2BuildConversionAllowlist) {
ctx.config.bp2buildPackageConfig = config
func (ctx *TestContext) RegisterBp2BuildConfig(config Bp2BuildConversionAllowlist) {
ctx.config.Bp2buildPackageConfig = config
}
// PreArchBp2BuildMutators adds mutators to be register for converting Android Blueprint modules