Skip to content

Commit

Permalink
Issue #mozilla-mobile#10335: Use Java 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo committed May 26, 2021
1 parent 239bc73 commit 1b78d7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ tasks:
# Note: This task is built server side without the context or tooling that
# exist in tree so we must hard code the hash
image:
mozillareleases/taskgraph:decision-mobile-682fbaa1ef17e70ddfe3457da3eaf8e776c4a20fe5bfbdbeba0641fd5bceae2a@sha256:bbb2613aaab79d17e590fbd78c072d0643be40fd1237195703f84280ecc3b302
mozillareleases/taskgraph:decision-mobile-7bc4ebab06c2d922a59bd01d414e6880db406312fd8a5da852eff706a7494e01@sha256:3913399822ef678f5d4acdbd3f27954f661ecd5a2563da206066923fe1f62333

maxRunTime: 1800

Expand Down
1 change: 1 addition & 0 deletions taskcluster/docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN apt-get update -qq \
# which we cannot navigate while building the Docker image.
&& apt-get install -y tzdata \
&& apt-get install -y openjdk-8-jdk \
openjdk-11-jdk \
expect \
git \
curl \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ set -v
mkdir -p ${NEXUS_WORK}/conf
cp /builds/worker/checkouts/src/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml ${NEXUS_WORK}/conf/nexus.xml

RUN_AS_USER=worker /opt/sonatype/nexus/bin/nexus restart
# For the Android build system we want Java 11. However this Nexus installation requires Java 8.
PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/:$PATH" RUN_AS_USER=worker /opt/sonatype/nexus/bin/nexus restart

# Wait "a while" for Nexus to actually start. Don't fail if this fails.
curl --retry-connrefused --retry-delay 2 --retry 100 \
Expand Down
7 changes: 5 additions & 2 deletions taskcluster/scripts/toolchain/repack-android-sdk-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

export ANDROID_SDK_ROOT=$MOZ_FETCHES_DIR

yes | "${ANDROID_SDK_ROOT}/tools/bin/sdkmanager" --licenses
# For the Android build system we want Java 11. However this version of sdkmanager requires Java 8.
JAVA8PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/:$PATH"

yes | PATH=$JAVA8PATH "${ANDROID_SDK_ROOT}/tools/bin/sdkmanager" --licenses

# It's nice to have the build logs include the state of the world upon completion.
"${ANDROID_SDK_ROOT}/tools/bin/sdkmanager" --list
PATH=$JAVA8PATH "${ANDROID_SDK_ROOT}/tools/bin/sdkmanager" --list

tar cf - -C "$ANDROID_SDK_ROOT" . --transform 's,^\./,android-sdk-linux/,' | xz > "$UPLOAD_DIR/android-sdk-linux.tar.xz"

0 comments on commit 1b78d7d

Please sign in to comment.