Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): target Android SDK level 35 #14181

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}` });
Expand Down
1 change: 1 addition & 0 deletions android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`
Expand Down
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=false
android.nonTransitiveRClass=false
android.suppressUnsupportedCompileSdk=35
8 changes: 4 additions & 4 deletions android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions android/titanium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
24 changes: 24 additions & 0 deletions android/titanium/res/values-v35/values.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Todo remove windowOptOutEdgeToEdgeEnforcement after implementing Edge-to-edge -->

<style name="Theme.Titanium.DayNight.Solid" parent="Theme.Titanium.Light.Solid">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<style name="Base.Theme.Titanium.Light" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<style name="Theme.Titanium.App" parent="Theme.Titanium.DayNight.Solid">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<style name="Theme.AppDerived" parent="Theme.Titanium.App">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

<style name="Base.Theme.Titanium.Dark" parent="Theme.MaterialComponents">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>
Loading