Skip to content

Commit

Permalink
add support for java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Camilo Sierra Rodriguez committed Mar 5, 2025
1 parent 9865d03 commit 863623d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ENV LANG=en_US.UTF-8

## Install dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
openjdk-21-jdk \
openjdk-17-jdk \
openjdk-11-jdk \
openjdk-8-jdk \
Expand Down Expand Up @@ -51,6 +52,7 @@ ENV JDK_ROOT "/usr/lib/jvm/"
RUN jenv add ${JDK_ROOT}/java-8-openjdk-amd64
RUN jenv add ${JDK_ROOT}/java-11-openjdk-amd64
RUN jenv add ${JDK_ROOT}/java-17-openjdk-amd64
RUN jenv add ${JDK_ROOT}/java-21-openjdk-amd64
RUN echo 'export PATH="$JENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(jenv init -)"' >> ~/.bashrc

Expand Down
8 changes: 4 additions & 4 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ if [ "$gcloud" = true ]; then
fi

# Setup test app environment variables
export KOTLIN_VERSION="1.9.10"
export GRADLE_VERSION="8.3"
export ANDROID_GRADLE_TOOLS_VERSION="8.1.1"
export KOTLIN_VERSION="2.1.10"
export GRADLE_VERSION="8.10"
export ANDROID_GRADLE_TOOLS_VERSION="8.7.3"
export COMPILE_SDK_VERSION="$android_api"
export BUILD_TOOLS_VERSION="$android_build_tools"
export MIN_SDK_VERSION=21
Expand Down Expand Up @@ -87,7 +87,7 @@ exec_test() {
ruby -v
eval "$(jenv init -)"

jenv global 17
jenv global 21
if [ "$android_ndk" = true ]; then
echo "Running tests with ndk"
exec_test "$script_path"/test-app-ndk
Expand Down
6 changes: 3 additions & 3 deletions tests/test-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "21"
}

}
Expand Down

0 comments on commit 863623d

Please sign in to comment.