Soong: support Errorprone javacflags
Add support for an errorprone block in Java modules that accepts additional javacflags for the errorprone build. Sample: errorprone: { javacflags: ["-Xep:EqualsNaN:WARN"], }, Bug: 72004718 Test: m RUN_ERROR_PRONE=true Test: manual - add block with ERROR to a project Test: androidmk_test Change-Id: I502248fe76c26aa19102f413af72a7324c35b7f4
This commit is contained in:
@@ -142,6 +142,11 @@ type CompilerProperties struct {
|
||||
Exclude_filter []string
|
||||
}
|
||||
|
||||
Errorprone struct {
|
||||
// List of javac flags that should only be used when running errorprone.
|
||||
Javacflags []string
|
||||
}
|
||||
|
||||
Proto struct {
|
||||
// List of extra options that will be passed to the proto generator.
|
||||
Output_params []string
|
||||
@@ -646,6 +651,10 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB
|
||||
flags.javacFlags = "$javacFlags"
|
||||
}
|
||||
|
||||
if len(j.properties.Errorprone.Javacflags) > 0 {
|
||||
flags.errorProneExtraJavacFlags = strings.Join(j.properties.Errorprone.Javacflags, " ")
|
||||
}
|
||||
|
||||
// javaVersion flag.
|
||||
sdk := sdkStringToNumber(ctx, String(j.deviceProperties.Sdk_version))
|
||||
if j.properties.Java_version != nil {
|
||||
|
Reference in New Issue
Block a user