From 8f98b4f24347e159e18513c32321b93fdbcf1bda Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 29 Sep 2025 13:25:23 +0200 Subject: [PATCH] Android: Update to SDK 35 (#16513) --- android/app/build.gradle | 2 +- android/build.gradle | 6 ++--- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/native/build.gradle | 2 +- doc/android.md | 22 +++++++++---------- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index eaf1e3571d..e02bd4ff08 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,7 +6,7 @@ android { applicationId 'net.minetest.minetest' minSdkVersion 21 compileSdk 34 - targetSdkVersion 34 + targetSdkVersion 35 versionName "${versionMajor}.${versionMinor}.${versionPatch}" versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild } diff --git a/android/build.gradle b/android/build.gradle index 57abd80883..08560205ae 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,8 +15,8 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.5.1' - classpath 'de.undercouch:gradle-download-task:4.1.1' + classpath 'com.android.tools.build:gradle:8.12.3' + classpath 'de.undercouch:gradle-download-task:5.6.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -30,5 +30,5 @@ allprojects { } task clean(type: Delete) { - delete rootProject.buildDir + delete rootProject.layout.buildDirectory } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b82aa23a4f..37f853b1c8 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/android/native/build.gradle b/android/native/build.gradle index b5224c6a00..91629add7b 100644 --- a/android/native/build.gradle +++ b/android/native/build.gradle @@ -68,5 +68,5 @@ if (new File(depsDir, 'armeabi-v7a').exists()) { preBuild.dependsOn getDeps clean { - delete new File(buildDir.parent, 'deps') + delete depsDir } diff --git a/doc/android.md b/doc/android.md index f51bce3ee9..1ebe298301 100644 --- a/doc/android.md +++ b/doc/android.md @@ -77,30 +77,28 @@ some shader settings cannot be used on OpenGL ES. Changing the graphic driver setting to OpenGL will not work. ## Building Requirements -In order to build, your PC has to be set up to build Luanti in the usual -manner (see the regular Luanti documentation for how to get this done). -In addition to what is required for Luanti in general, you will need the -following software packages. The version number in parenthesis denotes the -version that was tested at the time this README was drafted; newer/older -versions may or may not work. -* Android SDK 29 -* Android NDK r21 -* Android Studio 3 [optional] +In order to build, you will need the following development tools: + +* Java JDK +* Android SDK +* `gettext` command line tools +* Android Studio [optional] Additionally, you'll need to have an Internet connection available on the build system, as the Android build will download some source packages. ## Build + The new build system Luanti Android is fully functional and is designed to speed up and simplify the work, as well as adding the possibility of cross-platform build. -You can use `./gradlew assemblerelease` or `./gradlew assembledebug` from the +You can use `./gradlew assembleRelease` or `./gradlew assembleDebug` from the command line or use Android Studio and click the build button. When using gradlew, the newest NDK will be downloaded and installed -automatically. Or you can create a `local.properties` file and specify -`sdk.dir` and `ndk.dir` yourself. +automatically. You have to create a `local.properties` file and specify +`sdk.dir` yourself if you want to use an existing installation. * In order to make a release build you'll have to have a keystore setup to sign the resulting apk package. How this is done is not part of this README. There