Move JarJar to a checked in deploy jar.
This comes in preparation for moving the Java tools to remote repositories (see #6316). This checked in jar will be moved to a remote repository and referenced from there.
Moving the Java tools happens in two phases:
Using checked-in deploy jars/binaries instead of those built when bazel was built
Moving the checked-in jars/binaries to a remote repository and make bazel reference them from there.
This PR addresses the first point for JarJar. Doing the move incrementally this way is safer and allows finding bugs earlier. It also allows moving the Java tools code base out of the bazel repository.
We are making this change gradually for each java tool defined in JAVA_TOOLS (found in src/BUILD).
Partial commit for third_party/*, see #7145.
Signed-off-by: iirina <elenairina@google.com>
diff --git a/third_party/jarjar/BUILD b/third_party/jarjar/BUILD
index 4f4f223..bc3d075 100644
--- a/third_party/jarjar/BUILD
+++ b/third_party/jarjar/BUILD
@@ -16,6 +16,7 @@
],
)
+# jarjar_bin
java_binary(
name = "jarjar_command",
srcs = glob(
diff --git a/third_party/java/java_tools/README.md b/third_party/java/java_tools/README.md
index 82bd2fb..408669c 100644
--- a/third_party/java/java_tools/README.md
+++ b/third_party/java/java_tools/README.md
@@ -17,3 +17,8 @@
third_party/java/java_tools/turbine_deploy.jar
third_party/java/java_tools/turbine_direct_binary_deploy.jar
third_party/java/java_tools/SingleJar_deploy.jar
+
+The following tools were built with bazel 0.21.0 at commit 019f13b64630ea7e7837a2ed8b664c4262322b1c by running:
+$ third_party/java/java_tools/update_java_tools.sh
+
+third_party/java/java_tools/jarjar_command_deploy.jar
\ No newline at end of file
diff --git a/third_party/java/java_tools/jarjar_command_deploy.jar b/third_party/java/java_tools/jarjar_command_deploy.jar
new file mode 100755
index 0000000..10bae88
--- /dev/null
+++ b/third_party/java/java_tools/jarjar_command_deploy.jar
Binary files differ
diff --git a/third_party/java/java_tools/update_java_tools.sh b/third_party/java/java_tools/update_java_tools.sh
index 1c44b21..c77013c 100755
--- a/third_party/java/java_tools/update_java_tools.sh
+++ b/third_party/java/java_tools/update_java_tools.sh
@@ -15,7 +15,8 @@
["JacocoCoverage"]="src/java_tools/junitrunner/java/com/google/testing/coverage:JacocoCoverage_jarjar_deploy.jar" \
["Turbine"]="src/java_tools/buildjar/java/com/google/devtools/build/java/turbine/javac:turbine_deploy.jar" \
["TurbineDirect"]="src/java_tools/buildjar/java/com/google/devtools/build/java/turbine:turbine_direct_binary_deploy.jar" \
-["SingleJar"]="src/java_tools/singlejar/java/com/google/devtools/build/singlejar:bazel-singlejar_deploy.jar")
+["SingleJar"]="src/java_tools/singlejar/java/com/google/devtools/build/singlejar:bazel-singlejar_deploy.jar"
+["JarJar"]="third_party/jarjar:jarjar_command_deploy.jar")
usage="This script updates the checked-in jars corresponding to the tools "\
"used by the Java rules in Bazel.