aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/java-native/src/main/java/com/example/myproject/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'examples/java-native/src/main/java/com/example/myproject/BUILD')
-rw-r--r--examples/java-native/src/main/java/com/example/myproject/BUILD24
1 files changed, 24 insertions, 0 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
new file mode 100644
index 0000000000..717625343b
--- /dev/null
+++ b/examples/java-native/src/main/java/com/example/myproject/BUILD
@@ -0,0 +1,24 @@
+package(default_visibility = ["//visibility:public"])
+
+java_binary(
+ name = "hello-world",
+ main_class = "com.example.myproject.Greeter",
+ runtime_deps = [":hello-lib"],
+)
+
+java_library(
+ name = "hello-lib",
+ srcs = glob(["*.java"]),
+)
+
+java_binary(
+ name = "hello-resources",
+ main_class = "com.example.myproject.Greeter",
+ runtime_deps = [":custom-greeting"],
+)
+
+java_library(
+ name = "custom-greeting",
+ srcs = ["Greeter.java"],
+ resources = ["//examples/java-native/src/main/resources:greeting"],
+)