aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/java-skylark/src/main/java/com/example/myproject/BUILD
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-24 09:05:08 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-24 16:41:48 +0000
commitadeef73a97cf191301a7b563883a075caed733b7 (patch)
treec06734cbffa4160b156779da7c87dbf5cc2b6f94 /examples/java-skylark/src/main/java/com/example/myproject/BUILD
parent5247ff53465afc6ad9db889d1ec3f106ec09a3d6 (diff)
Move all examples into Bazel workspace
Those examples will be used for Bazel integration tests and their sources should be available directly to the Bazel workspace itself. -- MOS_MIGRATED_REVID=89380736
Diffstat (limited to 'examples/java-skylark/src/main/java/com/example/myproject/BUILD')
-rw-r--r--examples/java-skylark/src/main/java/com/example/myproject/BUILD21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/java-skylark/src/main/java/com/example/myproject/BUILD b/examples/java-skylark/src/main/java/com/example/myproject/BUILD
new file mode 100644
index 0000000000..10ca2d440d
--- /dev/null
+++ b/examples/java-skylark/src/main/java/com/example/myproject/BUILD
@@ -0,0 +1,21 @@
+load("/tools/build_rules/java_rules_skylark", "java_library", "java_binary", "java_test")
+
+package(default_visibility = ["//visibility:public"])
+
+java_binary(
+ name = "hello-world",
+ srcs = ["Greeter.java"],
+ main_class = "com.example.myproject.Greeter",
+)
+
+java_binary(
+ name = "hello-data",
+ main_class = "com.example.myproject.Greeter",
+ deps = [":hello-lib"],
+)
+
+java_library(
+ name = "hello-lib",
+ srcs = ["Greeter.java"],
+ data = ["//examples/java-skylark/src/main/resources:greeting"],
+)