aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/java-native
diff options
context:
space:
mode:
authorGravatar Liam Miller-Cushon <cushon@google.com>2015-06-19 00:35:26 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-06-19 11:05:24 +0000
commit1ed3c47564e48bcdfff76a356da80ccc9da36c5b (patch)
tree03041e7417d50986b012861b7cb35abac85120d0 /examples/java-native
parentcda5b66af3da31c74df73a8a19f67691d5d9454f (diff)
Move the Error Prone plugin into Bazel
-- MOS_MIGRATED_REVID=96365813
Diffstat (limited to 'examples/java-native')
-rw-r--r--examples/java-native/src/main/java/com/example/myproject/BUILD10
-rw-r--r--examples/java-native/src/main/java/com/example/myproject/HelloErrorProne.java10
2 files changed, 19 insertions, 1 deletions
diff --git a/examples/java-native/src/main/java/com/example/myproject/BUILD b/examples/java-native/src/main/java/com/example/myproject/BUILD
index 960877761f..72cbf76423 100644
--- a/examples/java-native/src/main/java/com/example/myproject/BUILD
+++ b/examples/java-native/src/main/java/com/example/myproject/BUILD
@@ -8,7 +8,10 @@ java_binary(
java_library(
name = "hello-lib",
- srcs = glob(["*.java"]),
+ srcs = glob(
+ ["*.java"],
+ exclude = ["HelloErrorProne.java"],
+ ),
)
java_binary(
@@ -23,6 +26,11 @@ java_library(
resources = ["//examples/java-native/src/main/resources:greeting"],
)
+java_library(
+ name = "hello-error-prone",
+ srcs = ["HelloErrorProne.java"],
+)
+
filegroup(
name = "srcs",
srcs = ["BUILD"] + glob(["**/*.java"]),
diff --git a/examples/java-native/src/main/java/com/example/myproject/HelloErrorProne.java b/examples/java-native/src/main/java/com/example/myproject/HelloErrorProne.java
new file mode 100644
index 0000000000..3f97adaac2
--- /dev/null
+++ b/examples/java-native/src/main/java/com/example/myproject/HelloErrorProne.java
@@ -0,0 +1,10 @@
+package com.example.myproject;
+
+/** Sanity check for Error Prone integration. */
+public class HelloErrorProne {
+ public static void main (String[] args) {
+ boolean result;
+ byte b = 0;
+ result = b == 255;
+ }
+}