bp2build converts java_version property to javacopts attribute
This CL also converts `external/rappor` (which already set `java_version` to `1.7`) to be bazelable to testify the changes. Results from `b build //external/rappor && cat bazel-bin/external/rappor/librappor.jar-0.params`: https://paste.googleplex.com/5518725462622208. Test: go test ./bp2build/... Bug: 227618664 Change-Id: I8d370d4639f70fba51e6de6ceb7bcb5ace9ccd91
This commit is contained in:
@@ -102,6 +102,7 @@ func TestJavaProtoDefault(t *testing.T) {
|
||||
blueprint: `java_library_static {
|
||||
name: "java-protos",
|
||||
srcs: ["a.proto"],
|
||||
java_version: "7",
|
||||
}
|
||||
`,
|
||||
expectedBazelTargets: []string{
|
||||
@@ -115,7 +116,8 @@ func TestJavaProtoDefault(t *testing.T) {
|
||||
"deps": `[":java-protos_proto"]`,
|
||||
}),
|
||||
makeBazelTarget("java_library", "java-protos", attrNameToString{
|
||||
"exports": `[":java-protos_java_proto_lite"]`,
|
||||
"exports": `[":java-protos_java_proto_lite"]`,
|
||||
"javacopts": `["-source 1.7 -target 1.7"]`,
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user