From 4087f7ca0618a32e1556d53618964ab485f493b5 Mon Sep 17 00:00:00 2001 From: Oleksandr Kalko Date: Sun, 10 Nov 2024 16:35:52 +0200 Subject: [PATCH 1/3] Android major upgrades * Use SDL2 2.30.9 * Use Android Gradle plugin 8.7.2 * Use latest NDK 28 * Use latest CMake 3.31.0 for configuration WARINING! Testing on real devices needed before merging, due to NDK upgrades I hvae verified everything works on Pixel 8 Pro via emulator, but nothing beats real device testing --- .github/workflows/Android.yml | 4 ++-- 3rdParty/SDL2/CMakeLists.txt | 4 ++-- android-project/app/build.gradle | 4 ++-- .../app/src/main/java/org/libsdl/app/SDLActivity.java | 6 +++--- android-project/build.gradle | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Android.yml b/.github/workflows/Android.yml index 8352e14d581..89727ba7188 100644 --- a/.github/workflows/Android.yml +++ b/.github/workflows/Android.yml @@ -40,8 +40,8 @@ jobs: uses: actions/cache@v4 with: path: android-project/app/.cxx - key: ${{ github.workflow }}-v4-${{ github.sha }} - restore-keys: ${{ github.workflow }}-v4- + key: ${{ github.workflow }}-v5-${{ github.sha }} + restore-keys: ${{ github.workflow }}-v5- - name: Build working-directory: ${{github.workspace}} diff --git a/3rdParty/SDL2/CMakeLists.txt b/3rdParty/SDL2/CMakeLists.txt index cee19795068..d566192ef6d 100644 --- a/3rdParty/SDL2/CMakeLists.txt +++ b/3rdParty/SDL2/CMakeLists.txt @@ -15,7 +15,7 @@ set(SDL_TEST_ENABLED_BY_DEFAULT OFF) include(functions/FetchContent_MakeAvailableExcludeFromAll) include(FetchContent) FetchContent_Declare(SDL2 - URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.7/SDL2-2.30.7.tar.gz - URL_HASH SHA256=2508c80438cd5ff3bbeb8fe36b8f3ce7805018ff30303010b61b03bb83ab9694 + URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz + URL_HASH SHA256=24b574f71c87a763f50704bbb630cbe38298d544a1f890f099a4696b1d6beba4 ) FetchContent_MakeAvailableExcludeFromAll(SDL2) diff --git a/android-project/app/build.gradle b/android-project/app/build.gradle index 180927e9215..ca83de10325 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' compileSdk 35 defaultConfig { if (buildAsApplication) { @@ -45,7 +45,7 @@ android { externalNativeBuild { cmake { path '../../CMakeLists.txt' - version "3.22.1+" + 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 2114311f1ff..88af2c5cadd 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 @@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh private static final String TAG = "SDL"; private static final int SDL_MAJOR_VERSION = 2; private static final int SDL_MINOR_VERSION = 30; - private static final int SDL_MICRO_VERSION = 7; + private static final int SDL_MICRO_VERSION = 9; /* // Display InputType.SOURCE/CLASS of events and devices // @@ -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 617c6e75548..11b0b32ca2b 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 From 927de747d3f6f982f4fe83053903f792c1d9fb4d Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 10 Nov 2024 23:45:13 +0100 Subject: [PATCH 2/3] Update Android.yml --- .github/workflows/Android.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/Android.yml b/.github/workflows/Android.yml index 89727ba7188..b0cce6e0763 100644 --- a/.github/workflows/Android.yml +++ b/.github/workflows/Android.yml @@ -36,6 +36,9 @@ jobs: distribution: 'adopt' cache: gradle + - name: Accept SDK licenses + run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses + - name: Cache CMake build folder uses: actions/cache@v4 with: From 9cca3ab3fa3f252a056515c49e7c2478daedea26 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 10 Nov 2024 23:49:19 +0100 Subject: [PATCH 3/3] Update Android.yml --- .github/workflows/Android.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/Android.yml b/.github/workflows/Android.yml index b0cce6e0763..9fc9528f1d8 100644 --- a/.github/workflows/Android.yml +++ b/.github/workflows/Android.yml @@ -39,6 +39,10 @@ jobs: - 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: Cache CMake build folder uses: actions/cache@v4 with: