Fix our Java 7 build
- Follow redirects when downloading files:
The github provided file lies after several redirect, giving a bad jars
(see http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/144/console).
- Remove building tools as part of the determinism tests:
With recent update, JavaBuilder can no longer be built with Java 7,
so we use a pre-built binary from version 0.1.0. However, the
determinism test was still using it as a point of comparison. Removing
tools from the determinism test prevent building JavaBuilder without
giving up on testing actual determinism (building Bazel already contains
all the edge-cases).
Tested with `bash -c 'export JAVA_VERSION=1.7; source scripts/ci/build.sh; bazel_build'`
--
MOS_MIGRATED_REVID=104480161
diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh
index 5b852b9..5e073de 100755
--- a/scripts/bootstrap/bootstrap.sh
+++ b/scripts/bootstrap/bootstrap.sh
@@ -82,7 +82,7 @@
run_silent ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} build \
--fetch --nostamp \
--javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
- //src:bazel //src:tools || return $?
+ //src:bazel || return $?
if [ -n "${BAZEL_SUM}" ]; then
cat bazel-genfiles/src/java.version >${BAZEL_SUM}
get_outputs_sum >> ${BAZEL_SUM} || return $?
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index aead279..76d9a62 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -109,8 +109,8 @@
sed -i.bak 's/_version = "8"/_version = "7"/' tools/jdk/BUILD
rm -f tools/jdk/BUILD.bak
rm -f third_party/java/jdk/langtools/javac.jar
- curl -s -o tools/jdk/JavaBuilder_deploy.jar "${javabuilder_url}"
- curl -s -o third_party/java/jdk/langtools/javac.jar "${javac_url}"
+ curl -Ls -o tools/jdk/JavaBuilder_deploy.jar "${javabuilder_url}"
+ curl -Ls -o third_party/java/jdk/langtools/javac.jar "${javac_url}"
export BAZEL_ARGS="--singlejar_top=//src/java_tools/singlejar:bootstrap_deploy.jar \
--genclass_top=//src/java_tools/buildjar:bootstrap_genclass_deploy.jar \
--ijar_top=//third_party/ijar"
diff --git a/src/BUILD b/src/BUILD
index a07be09..8076a73 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -35,8 +35,8 @@
)
# Try to grab the java version from the java_toolchain.
-# Unfortunately, we don't the javac options so we cannot get it from
-# the command-line options.
+# Unfortunately, we don't have access to the javac options
+# so we cannot get it from the command-line options.
genquery(
name = "java_toolchain_content",
expression = "kind(java_toolchain, deps(//tools/defaults:java_toolchain))",
@@ -137,16 +137,6 @@
],
)
-filegroup(
- name = "tools",
- srcs = [
- "//src/java_tools/buildjar:JavaBuilder_deploy.jar",
- "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass:GenClass_deploy.jar",
- "//src/java_tools/singlejar:SingleJar_deploy.jar",
- "//third_party/ijar",
- ],
-)
-
config_setting(
name = "darwin",
values = {"cpu": "darwin"},