refactor android_app bp2build

Test: bp2build tests and locally built MusicKotlin
Change-Id: Ia5a58b26717a0252e3ae87ea68182e6f2b5c60cf
This commit is contained in:
Alix
2023-02-06 14:53:10 +00:00
committed by Alix Espino
parent 28f4af7955
commit 733110e745

View File

@@ -1524,7 +1524,6 @@ func (a *AndroidApp) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
appAttrs.javaCommonAttributes = commonAttrs
appAttrs.bazelAapt = aapt
appAttrs.Deps = deps
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: a.Name()}, appAttrs)
} else {
ktName := a.Name() + "_kt"
commonAttrs.Common_srcs = bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, a.properties.Common_srcs))
@@ -1545,11 +1544,12 @@ func (a *AndroidApp) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
appAttrs.bazelAapt = &bazelAapt{Manifest: aapt.Manifest}
appAttrs.Deps = bazel.MakeSingleLabelListAttribute(bazel.Label{Label: ":" + ktName})
ctx.CreateBazelTargetModule(
props,
android.CommonAttributes{Name: a.Name()},
appAttrs,
)
}
ctx.CreateBazelTargetModule(
props,
android.CommonAttributes{Name: a.Name()},
appAttrs,
)
}