support errorprone javacflags
Soong has a separate property specifically for errorprone javacflags that we need to add to the Bazel javacopts. Test: go test ./bp2build Change-Id: I5299f45793d2b05a6a71b94dd17ceb797f407846
This commit is contained in:
15
java/java.go
15
java/java.go
@@ -2060,15 +2060,22 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
protoSrcPartition: android.ProtoSrcLabelPartition,
|
||||
})
|
||||
|
||||
var javacopts []string
|
||||
if m.properties.Javacflags != nil {
|
||||
javacopts = append(javacopts, m.properties.Javacflags...)
|
||||
}
|
||||
epEnabled := m.properties.Errorprone.Enabled
|
||||
//TODO(b/227504307) add configuration that depends on RUN_ERROR_PRONE environment variable
|
||||
if Bool(epEnabled) {
|
||||
javacopts = append(javacopts, m.properties.Errorprone.Javacflags...)
|
||||
}
|
||||
|
||||
commonAttrs := &javaCommonAttributes{
|
||||
Srcs: srcPartitions[javaSrcPartition],
|
||||
Plugins: bazel.MakeLabelListAttribute(
|
||||
android.BazelLabelForModuleDeps(ctx, m.properties.Plugins),
|
||||
),
|
||||
}
|
||||
|
||||
if m.properties.Javacflags != nil {
|
||||
commonAttrs.Javacopts = bazel.MakeStringListAttribute(m.properties.Javacflags)
|
||||
Javacopts: bazel.MakeStringListAttribute(javacopts),
|
||||
}
|
||||
|
||||
depLabels := &javaDependencyLabels{}
|
||||
|
Reference in New Issue
Block a user