Skip to content

Commit

Permalink
Update Linux Dockerfile and install Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
rvandermeulen committed Jun 13, 2023
1 parent 3be337c commit ac9107b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ The following instructions assume that you are building `application-services` f
1. Install Android SDK, JAVA, NDK and set required env vars
1. Clone the [firefox-android](https://github.com/mozilla-mobile/firefox-android) repository (**not** inside the Application Service repository).
1. Install [Java **11**](https://www.oracle.com/java/technologies/downloads/#java11) for your system
1. Set `JAVA_HOME` to point to the JDK 11 installation directory.
1. Install [Java **17**](https://www.oracle.com/java/technologies/downloads/#java17) for your system
1. Set `JAVA_HOME` to point to the JDK 17 installation directory.
1. Download and install [Android Studio](https://developer.android.com/studio/#downloads).
1. Set `ANDROID_SDK_ROOT` and `ANDROID_HOME` to the Android Studio sdk location and add it to your rc file (either `.zshrc` or `.bashrc` depending on the shell you use for your terminal).
1. Configure the required versions of NDK
Expand Down
6 changes: 3 additions & 3 deletions libs/verify-android-ci-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ location of your Java installation."
fi

JAVA_VERSION=$("$JAVACMD" -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-2)
if [[ "${JAVA_VERSION}" != "11.0" ]]; then
echo "Incompatible java version: ${JAVA_VERSION}. JDK 11 must be installed."
echo "Try switching versions and re-running. Using sdkman: sdk install java 11.0.3.hs-adpt || sdk use 11.0.3.hs-adpt"
if [[ "${JAVA_VERSION}" != "17.0" ]]; then
echo "Incompatible java version: ${JAVA_VERSION}. JDK 17 must be installed."
echo "Try switching versions and re-running. Using sdkman: sdk install java 17.0.7-tem || sdk use 17.0.7-tem"
exit 1
fi

Expand Down
14 changes: 7 additions & 7 deletions taskcluster/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

FROM ubuntu:18.04

MAINTAINER Edouard Oger "eoger@mozilla.com"
FROM ubuntu:22.04

# Add worker user

Expand Down Expand Up @@ -51,12 +49,12 @@ RUN apt-get update -qq \
# If you add anything below, please update building.md.
####################
# Android builds
openjdk-11-jdk \
openjdk-17-jdk \
# Required by gyp but also CI scripts.
python \
python-pip \
python3 \
python3-pip \
# Required by NSS build system until bug 1766767 is fixed.
python-is-python3 \
# libs/ source patching.
patch \
# NSS build system.
Expand Down Expand Up @@ -85,6 +83,8 @@ RUN apt-get update -qq \
zip \
# Required to extract the Android SDK/NDK.
unzip \
# Required to extract tar.bz2 archives.
bzip2 \
# Required by tooltool to extract tar.xz archives.
xz-utils \
# For windows cross-compilation.
Expand Down Expand Up @@ -159,7 +159,7 @@ ENV CCACHE=sccache \
RUN \
curl -sfSL --retry 5 --retry-delay 10 \
-o /usr/local/bin/tooltool.py \
https://raw.githubusercontent.com/mozilla/build-tooltool/36511dae0ead6848017e2d569b1f6f1b36984d40/tooltool.py && \
https://raw.githubusercontent.com/mozilla-releng/tooltool/master/client/tooltool.py && \
chmod +x /usr/local/bin/tooltool.py

# %include-run-task
Expand Down

0 comments on commit ac9107b

Please sign in to comment.