Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move jarjar to a checked in deploy jar. #7143

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ py_binary(
# The tools Bazel uses to compile Java.
# TODO(#6316): Gradually remove the targets here.
JAVA_TOOLS = [
"//third_party/jarjar:embedded_tools_srcs",
"//third_party/java/jdk/langtools:test-srcs",
"//third_party/java/proguard:embedded_tools",
"//src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper:srcs",
Expand Down
2 changes: 2 additions & 0 deletions src/create_embedded_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
('*tools/cpp/runfiles/generated_*',
lambda x: 'tools/cpp/runfiles/' + os.path.basename(x)[len('generated_'):]),
('*JavaBuilder*_deploy.jar', lambda x: 'tools/jdk/' + os.path.basename(x)),
('*jarjar_command_deploy.jar',
lambda x: 'tools/jdk/jarjar_command_deploy.jar'),
('*JacocoCoverage*_deploy.jar',
lambda x: 'tools/jdk/JacocoCoverage_deploy.jar'),
('*turbine_deploy.jar', lambda x: 'tools/jdk/turbine_deploy.jar'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ genrule(
outs = ["JacocoCoverage_jarjar_deploy.jar"],
cmd = "\n".join([
"JARJAR=\"$$(mktemp -t bazel.XXXXXXXX)\"",
"\"$(JAVA)\" -jar \"$(location //third_party/jarjar:jarjar_bin_deploy.jar)\" process \"$(location :JacocoCoverage.jarjar)\" \"$(location :JacocoCoverage_deploy.jar)\" \"$${JARJAR}\"",
"\"$(JAVA)\" -jar \"$(location //third_party/jarjar:jarjar_command_deploy.jar)\" process \"$(location :JacocoCoverage.jarjar)\" \"$(location :JacocoCoverage_deploy.jar)\" \"$${JARJAR}\"",
"\"$(JAVA)\" -jar \"$(location //src/java_tools/singlejar:SingleJar_deploy.jar)\" --normalize --sources \"$${JARJAR}\" --output \"$@\"",
"rm -fr \"$${JARJAR}\"",
]),
tags = ["manual"],
toolchains = ["@bazel_tools//tools/jdk:current_host_java_runtime"],
tools = [
"//src/java_tools/singlejar:SingleJar_deploy.jar",
"//third_party/jarjar:jarjar_bin_deploy.jar",
"//third_party/jarjar:jarjar_command_deploy.jar",
"@bazel_tools//tools/jdk:current_host_java_runtime",
],
)
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
5 changes: 5 additions & 0 deletions tools/jdk/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ java_import(
jars = [":JacocoCoverage_deploy.jar"],
)

java_import(
name = "JarJar",
jars = [":jarjar_command_deploy.jar"]
)

test_suite(
name = "windows_tests",
tags = [
Expand Down