Merge "refactor android_app bp2build"

This commit is contained in:
Alix Espino
2023-02-06 19:13:02 +00:00
committed by Gerrit Code Review

View File

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