summaryrefslogtreecommitdiff
path: root/java/builder.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2017-09-05 13:16:45 -0700
committer Colin Cross <ccross@android.com> 2017-09-05 22:08:13 -0700
commitfee57cb33e83f04f5c29b4b1a669be3b4b87264f (patch)
tree667cca0f016101a512360ac932bbface51905e96 /java/builder.go
parent32616ed3e055537be7eac9634b78d9dd584386af (diff)
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
Diffstat (limited to 'java/builder.go')
-rw-r--r--java/builder.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/builder.go b/java/builder.go
index 6912c872e..e359529a5 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -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")