aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorSam Delmerico <delmerico@google.com>2022-01-06 20:03:51 +0000
committerSam Delmerico <delmerico@google.com>2022-01-06 21:00:46 +0000
commit4e27229b61b734afc31923c8f6ddf0c1224aead2 (patch)
tree580e1590b68837ed49191793a17fd5cc23d71ef5 /java/java.go
parentfe74791982bea89c2017e6e10968786866bf9948 (diff)
Convert javacflags -> javacopts for java_binary_host
This has already been done for java_library modules, we need to add similar support for java_binary_host. Bug: 213456294 Test: go test ./bp2build Change-Id: Idf7b631f3afe9f59e50f9e45bcbdc29fb5923cc6
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 9b4a005f0..73fd9c226 100644
--- a/java/java.go
+++ b/java/java.go
@@ -24,6 +24,7 @@ import (
"strings"
"android/soong/bazel"
+
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -2000,6 +2001,7 @@ type javaBinaryHostAttributes struct {
Deps bazel.LabelListAttribute
Main_class string
Jvm_flags bazel.StringListAttribute
+ Javacopts bazel.StringListAttribute
}
// JavaBinaryHostBp2Build is for java_binary_host bp2build.
@@ -2021,6 +2023,10 @@ func javaBinaryHostBp2Build(ctx android.TopDownMutatorContext, m *Binary) {
Main_class: mainClass,
}
+ if m.properties.Javacflags != nil {
+ attrs.Javacopts = bazel.MakeStringListAttribute(m.properties.Javacflags)
+ }
+
// Attribute deps
deps := []string{}
if m.properties.Static_libs != nil {