Skip to content

Commit e67fdca

Browse files
committed
chore(android): update SDK version
As per Google Play policies, we need to update our target SDK version to 35 to stay supported on the latest Android versions, allowing us to continue releasing the app. There's various different advice about what to do about the compile SDK version: generally I like to follow Android Studio's guidance which suggests they should be the same, so let's update the compile SDK version here too... Finally, we need to update our gradle versions or the new SDK version will not compile Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Change-Id: I6a6a69640058b47d71b7de3b45fb3a8036513ba1
1 parent 925887a commit e67fdca

5 files changed

Lines changed: 23 additions & 7 deletions

File tree

android/app/build.gradle.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ apply from: 'appSettings.gradle'
55

66
android {
77
namespace 'org.libreoffice.androidapp'
8-
compileSdkVersion 34
8+
compileSdkVersion 35
99
buildDir = "${rootProject.getBuildDir()}/app"
1010
ndkVersion "22.1.7171670"
11+
buildFeatures.buildConfig = true
1112

1213
defaultConfig {
1314
// applicationId, versionCode and versionName are defined in appSettings.gradle
1415
minSdkVersion 26
15-
targetSdkVersion 34
16+
targetSdkVersion 35
1617

1718
resValue "string", "app_name", "${liboAppName}"
1819
resValue "string", "vendor", "${liboVendor}"

android/build.gradle.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.0.0'
10+
classpath 'com.android.tools.build:gradle:8.9.2'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12-
android.defaults.buildfeatures.buildconfig=true
1312
android.enableJetifier=true
1413
android.nonFinalResIds=false
1514
android.nonTransitiveRClass=false

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip

android/lib/build.gradle.in

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ apply from: 'libSettings.gradle'
55

66
android {
77
namespace 'org.libreoffice.androidlib'
8-
compileSdkVersion 34
8+
compileSdkVersion 35
99
buildDir = "${rootProject.getBuildDir()}/lib"
1010
ndkVersion "22.1.7171670"
11+
buildFeatures.buildConfig = true
1112

1213
defaultConfig {
1314
minSdkVersion 26
14-
targetSdkVersion 34
15+
targetSdkVersion 35
1516
versionCode 1
1617
versionName "1.0"
1718

@@ -334,4 +335,19 @@ afterEvaluate {
334335
}
335336
generateDebugAssets.dependsOn copyDocTemplates, copyKitConfig, generateCoolDebugAssets
336337
generateReleaseAssets.dependsOn copyDocTemplates, copyKitConfig, generateCoolReleaseAssets
338+
339+
// These tasks only exist under some cases (not in Android Studio)...
340+
// ...so use tasks.named so they don't fail if they are never registered...
341+
// ...also allows us to do the same thing for lots of tasks which are in the same case after the latest Android Gradle Plugin upgrade...
342+
tasks.named { it in [
343+
"generateDebugLintModel",
344+
"generateDebugLintReportModel",
345+
"generateDebugLintVitalModel",
346+
"generateReleaseLintModel",
347+
"generateReleaseLintVitalModel",
348+
"lintAnalyzeDebug",
349+
"lintVitalAnalyzeRelease",
350+
] }.configureEach {
351+
dependsOn copyDocTemplates, copyKitConfig
352+
}
337353
}

0 commit comments

Comments
 (0)