Merge "Re-order android_app bp2build converter logic." into main am: 2195f24ec4 am: 80a3c08c0c am: 0b02d44081

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2744723

Change-Id: Iff9f8244e307f4c0a05a68c860c31f5f935057b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Romain Jobredeaux
2023-09-12 16:13:55 +00:00
committed by Automerger Merge Worker

View File

@@ -1632,15 +1632,6 @@ type bazelAndroidAppAttributes struct {
// ConvertWithBp2build is used to convert android_app to Bazel.
func (a *AndroidApp) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
commonAttrs, bp2BuildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
if !supported {
return
}
depLabels := bp2BuildInfo.DepLabels
deps := depLabels.Deps
deps.Append(depLabels.StaticDeps)
aapt, supported := a.convertAaptAttrsWithBp2Build(ctx)
if !supported {
return
@@ -1711,9 +1702,17 @@ func (a *AndroidApp) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
})
appAttrs.Proguard_specs.Add(bazel.MakeLabelAttribute(":" + generatedFlagFileRuleName))
}
}
commonAttrs, bp2BuildInfo, supported := a.convertLibraryAttrsBp2Build(ctx)
if !supported {
return
}
depLabels := bp2BuildInfo.DepLabels
deps := depLabels.Deps
deps.Append(depLabels.StaticDeps)
props := bazel.BazelTargetModuleProperties{
Rule_class: "android_binary",
Bzl_load_location: "//build/bazel/rules/android:android_binary.bzl",