summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Alix Espino <agespino@google.com> 2023-03-14 18:35:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-03-14 18:35:15 +0000
commitd184706daa2a083a6abcc954976cf05e84328f5b (patch)
treed8bb0591d677187a706c691bb4f212f321cbf19a /java/java.go
parent261bc296781de825b6e7546060d7dab10cb1df1a (diff)
parentf848bf82254b25bba0166f451e0a88c6bee3d5e6 (diff)
Merge "bp2build kotlinCFlags"
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go
index e8f78ba4a..15ee4a995 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2787,11 +2787,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{
@@ -2810,7 +2811,8 @@ type javaLibraryAttributes struct {
}
type kotlinAttributes struct {
- Common_srcs bazel.LabelListAttribute
+ Common_srcs bazel.LabelListAttribute
+ Kotlincflags *[]string
}
func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) {