Move error_prone config to external/error_prone

The error_prone config will likely need to be updated at the same
time as the error_prone prebuilts, so move the config into the same
project.  This requires jumping through some hoops because
external/error_prone may not be present in all manifests.

Bug: 64489631
Test: m -j RUN_ERROR_PRONE=true
Change-Id: I2c59df1148134ffedac0e00d32ac7082a9fb5330
This commit is contained in:
Colin Cross
2017-09-05 13:16:45 -07:00
parent 32616ed3e0
commit fee57cb33e
5 changed files with 56 additions and 106 deletions

View File

@@ -21,9 +21,10 @@ package java
import (
"strings"
"android/soong/android"
"github.com/google/blueprint"
"android/soong/android"
"android/soong/java/config"
)
var (
@@ -166,6 +167,11 @@ func TransformJavaToClasses(ctx android.ModuleContext, srcFiles android.Paths, s
func RunErrorProne(ctx android.ModuleContext, srcFiles android.Paths, srcFileLists android.Paths,
flags javaBuilderFlags, deps android.Paths) android.Path {
if config.ErrorProneJar == "" {
ctx.ModuleErrorf("cannot build with Error Prone, missing external/error_prone?")
return nil
}
classDir := android.PathForModuleOut(ctx, "classes-errorprone")
annoDir := android.PathForModuleOut(ctx, "anno-errorprone")
classFileList := android.PathForModuleOut(ctx, "classes-errorprone.list")