From 1923da994606f3cfe934cf73e8abe34c735b0983 Mon Sep 17 00:00:00 2001 From: Oleksandr Kalko Date: Mon, 11 Nov 2024 12:00:27 +0200 Subject: [PATCH] Android major upgrades (#7524) --- .github/workflows/cmake.yml | 10 ++++++++-- android-project/app/build.gradle | 4 ++-- .../app/src/main/java/org/libsdl/app/SDLActivity.java | 4 ++-- android-project/build.gradle | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d7a71306398..e0d03db3b0d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -32,8 +32,14 @@ jobs: # CMake version 3.21.3 causes gradle to throw a NullPointerException during the build # Removing it will cause gradle to fall back on 3.18.1 installed by the Android SDK - - name: Remove system CMake - run: rm /usr/local/bin/cmake + #- name: Remove system CMake + # run: rm /usr/local/bin/cmake + - name: Accept SDK licenses + run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses + + - name: Install CMake + run: | + $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.31.0" #- name: Test CMake # shell: bash diff --git a/android-project/app/build.gradle b/android-project/app/build.gradle index 97592e04a70..ab937fe25ab 100644 --- a/android-project/app/build.gradle +++ b/android-project/app/build.gradle @@ -7,7 +7,7 @@ if (buildAsApplication) { } android { - ndkVersion '26.1.10909125' + ndkVersion '28.0.12433566' // ndkVersion '25.2.9519653' compileSdk 35 aaptOptions { // probably does not matter... @@ -51,7 +51,7 @@ android { externalNativeBuild { cmake { path '../../CMakeLists.txt' - version "3.13.0+" + version "3.31.0+" buildStagingDirectory System.env.DevilutionX_Android_StagingDirectory } } diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index 88c5ea3038b..c987af12a9b 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -89,7 +89,7 @@ public static void debugSource(int sources, String prefix) { | InputDevice.SOURCE_CLASS_POSITION | InputDevice.SOURCE_CLASS_TRACKBALL); - if (s2 != 0) cls += "Some_Unkown"; + if (s2 != 0) cls += "Some_Unknown"; s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class; @@ -163,7 +163,7 @@ public static void debugSource(int sources, String prefix) { if (s == FLAG_TAINTED) src += " FLAG_TAINTED"; s2 &= ~FLAG_TAINTED; - if (s2 != 0) src += " Some_Unkown"; + if (s2 != 0) src += " Some_Unknown"; Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src); } diff --git a/android-project/build.gradle b/android-project/build.gradle index 0982daa031e..4f6830b7244 100644 --- a/android-project/build.gradle +++ b/android-project/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.1' + classpath 'com.android.tools.build:gradle:8.7.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files