Update to Java 21 + hardcode NDK to avoid warnings

This commit is contained in:
Imran Remtulla
2025-05-31 03:57:16 -04:00
parent 8bec3cf053
commit 0a30bf6d8e
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
java-version: '21'
- name: Flutter Doctor
id: flutter_doctor

View File

@ -29,7 +29,7 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "dev.imranr.obtainium"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
ndkVersion = "27.0.12077973" // 'flutter.ndkVersion' produces warnings (TODO can/should we switch back?)
compileOptions {
isCoreLibraryDesugaringEnabled = true

View File

@ -51,7 +51,7 @@ RUN \
mv ${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools ${ANDROID_SDK_ROOT}/cmdline-tools/latest && \
rm -v /tmp/tools.zip && \
mkdir -p /root/.android/ && touch /root/.android/repositories.cfg &&\
apt-get install -y --no-install-recommends openjdk-17-jdk openjdk-17-jre &&\
apt-get install -y --no-install-recommends openjdk-21-jdk openjdk-21-jre &&\
yes | sdkmanager --licenses &&\
sdkmanager --update