Merge "bp2build kotlinCFlags" am: d184706daa am: 54bfcc938f am: ea66e1bd5d

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

Change-Id: Iecf554834e09c97103b054c8726d63715e42395e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alix Espino
2023-03-14 20:02:17 +00:00
committed by Automerger Merge Worker
6 changed files with 145 additions and 6 deletions

View File

@@ -2786,11 +2786,12 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
depLabels.StaticDeps = bazel.MakeLabelListAttribute(staticDeps)
hasKotlin := !kotlinSrcs.IsEmpty()
commonAttrs.kotlinAttributes = &kotlinAttributes{
Kotlincflags: &m.properties.Kotlincflags,
}
if len(m.properties.Common_srcs) != 0 {
hasKotlin = true
commonAttrs.kotlinAttributes = &kotlinAttributes{
bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, m.properties.Common_srcs)),
}
commonAttrs.kotlinAttributes.Common_srcs = bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, m.properties.Common_srcs))
}
bp2BuildInfo := &bp2BuildJavaInfo{
@@ -2809,7 +2810,8 @@ type javaLibraryAttributes struct {
}
type kotlinAttributes struct {
Common_srcs bazel.LabelListAttribute
Common_srcs bazel.LabelListAttribute
Kotlincflags *[]string
}
func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) {