Skip to content

Commit

Permalink
Move JarJar to a checked in deploy jar.
Browse files Browse the repository at this point in the history
instead of embedding the deploy jar that is built when the bazel binary is built.

This comes in preparation for moving the Java tools to remote repositories (see bazelbuild#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).
  • Loading branch information
iirina committed Jan 16, 2019
1 parent 019f13b commit e26dca2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions third_party/jarjar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ filegroup(
],
)

# jarjar_bin
java_binary(
name = "jarjar_command",
srcs = glob(
Expand Down
14 changes: 0 additions & 14 deletions third_party/jarjar/BUILD.tools

This file was deleted.

5 changes: 5 additions & 0 deletions third_party/java/java_tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ third_party/java/java_tools/JacocoCoverage_jarjar_deploy.jar
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
Binary file not shown.
3 changes: 2 additions & 1 deletion third_party/java/java_tools/update_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ declare -A tool_name_to_target=(["JavaBuilder"]="src/java_tools/buildjar:JavaBui
["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.
Expand Down

0 comments on commit e26dca2

Please sign in to comment.