From b045371e554839769c9d0749c41eaedd5a133922 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Sun, 9 Feb 2025 20:25:08 +0100 Subject: [PATCH] feat(android): target Android SDK level 35 --- android/app/build.gradle | 4 ++-- android/cli/commands/_build.js | 1 + android/cli/commands/_buildModule.js | 1 + android/gradle.properties | 1 + android/package.json | 8 ++++---- android/titanium/build.gradle | 4 ++-- android/titanium/res/values-v35/values.xml | 24 ++++++++++++++++++++++ 7 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 android/titanium/res/values-v35/values.xml diff --git a/android/app/build.gradle b/android/app/build.gradle index d89cdc7bbfd..99b5e424837 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -9,12 +9,12 @@ apply plugin: 'com.android.application' // Set up Android app project. android { - compileSdkVersion 34 + compileSdkVersion 35 ndkVersion project.ext.tiNdkVersion defaultConfig { applicationId 'com.titanium.test' minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 versionCode 1 versionName '1.0' manifestPlaceholders = project.ext.tiManifestPlaceholders diff --git a/android/cli/commands/_build.js b/android/cli/commands/_build.js index 522adb32ceb..ba3b13dafbe 100644 --- a/android/cli/commands/_build.js +++ b/android/cli/commands/_build.js @@ -2153,6 +2153,7 @@ AndroidBuilder.prototype.generateRootProjectFiles = async function generateRootP // This is needed because using both libraries will cause class name collisions, causing a build failure. const gradleProperties = await gradlew.fetchDefaultGradleProperties(); gradleProperties.push({ key: 'android.useAndroidX', value: 'true' }); + gradleProperties.push({ key: 'android.suppressUnsupportedCompileSdk', value: '35' }); gradleProperties.push({ key: 'android.enableJetifier', value: 'true' }); gradleProperties.push({ key: 'android.nonTransitiveRClass', value: 'false' }); gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory}` }); diff --git a/android/cli/commands/_buildModule.js b/android/cli/commands/_buildModule.js index 84614b78f57..bd1257059f1 100644 --- a/android/cli/commands/_buildModule.js +++ b/android/cli/commands/_buildModule.js @@ -496,6 +496,7 @@ AndroidModuleBuilder.prototype.generateRootProjectFiles = async function generat // Create a "gradle.properties" file. Will add network proxy settings if needed. const gradleProperties = await gradlew.fetchDefaultGradleProperties(); gradleProperties.push({ key: 'android.useAndroidX', value: 'true' }); + gradleProperties.push({ key: 'android.suppressUnsupportedCompileSdk', value: '35' }); gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory} -Dkotlin.daemon.jvm.options="-Xmx${this.javacMaxMemory}"` diff --git a/android/gradle.properties b/android/gradle.properties index 073e209f36e..d28c44d4a09 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -13,3 +13,4 @@ org.gradle.jvmargs=-Xmx1536m android.useAndroidX=true android.enableJetifier=false android.nonTransitiveRClass=false +android.suppressUnsupportedCompileSdk=35 diff --git a/android/package.json b/android/package.json index 72d1b882847..37c6e6a61a9 100644 --- a/android/package.json +++ b/android/package.json @@ -17,12 +17,12 @@ "integrity": "sha512-A0tV+fYtkpKfIF5roRTCFPtdULMFygmfWlEuuHOBjC3q4rz/mKnAsJTYBlqayC/4oYEWehj867Oh1o6vy26XHQ==" }, "minSDKVersion": "21", - "compileSDKVersion": "34", + "compileSDKVersion": "35", "vendorDependencies": { - "android sdk": ">=23.x <=34.x", - "android build tools": ">=30.0.2 <=34.x", + "android sdk": ">=23.x <=35.x", + "android build tools": ">=30.0.2 <=35.x", "android platform tools": "33.x", - "android tools": "<=34.x", + "android tools": "<=35.x", "android ndk": ">=r21 <=r22b", "java": ">=11.x" }, diff --git a/android/titanium/build.gradle b/android/titanium/build.gradle index a5909b6a936..d36eaa4890e 100644 --- a/android/titanium/build.gradle +++ b/android/titanium/build.gradle @@ -46,9 +46,9 @@ android { ndkVersion project.ext.tiNdkVersion namespace 'org.appcelerator.titanium' defaultConfig { - compileSdk 34 + compileSdk 35 minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 versionName tiBuildVersionString versionCode tiBuildVersionCode buildConfigField('int', 'VERSION_CODE', tiBuildVersionCode.toString()) diff --git a/android/titanium/res/values-v35/values.xml b/android/titanium/res/values-v35/values.xml new file mode 100644 index 00000000000..8a67fd392d2 --- /dev/null +++ b/android/titanium/res/values-v35/values.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +