From 60fb73b37163827f222fe9aa1562b3ef3602b321 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Wed, 18 Mar 2026 14:42:18 +0100 Subject: [PATCH 1/5] chore(android): update gradle --- android/build.gradle | 4 +++- android/gradle/wrapper/gradle-wrapper.properties | 2 +- android/gradlew.bat | 4 ++-- android/titanium/libv8-services.js | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 69907029804..f7d88970600 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,6 +5,8 @@ * Please see the LICENSE included with this distribution for details. */ +apply from: 'untar.gradle' + buildscript { ext.kotlin_version = '2.3.0' @@ -13,7 +15,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.13.2' + classpath 'com.android.tools.build:gradle:9.1.0' classpath 'com.google.gms:google-services:4.4.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'org.codehaus.groovy:groovy-json:3.0.17' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7705927e949..5be30bbeb24 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.14.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/android/gradlew.bat b/android/gradlew.bat index d8362afbfa2..5eed7ee8452 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -23,7 +23,7 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with Windows NT shell +@rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 @@ -77,7 +77,7 @@ set CLASSPATH= "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end -@rem End local scope for the variables with Windows NT shell +@rem End local scope for the variables with windows NT shell if %ERRORLEVEL% equ 0 goto mainEnd :fail diff --git a/android/titanium/libv8-services.js b/android/titanium/libv8-services.js index bad75afa368..b2ffe00c346 100644 --- a/android/titanium/libv8-services.js +++ b/android/titanium/libv8-services.js @@ -255,10 +255,11 @@ async function updateLibrary() { console.log(`Decompressing downloaded V8 file: ${inFile}`); const untarCommandLine = quotePath(path.join(__dirname, '..', isWindows ? 'gradlew.bat' : 'gradlew')) - + ' -b ' + quotePath(path.join(__dirname, '..', 'untar.gradle')) + + ' -p ' + quotePath(path.join(__dirname, '..')) + ' -Pcompression=bzip2' + ' -Psrc=' + quotePath(inFile) + ' -Pdest=' + quotePath(outDir); + // + ' -I ' + quotePath(path.join(__dirname, '..', 'untar.gradle')); return exec(untarCommandLine); }); // Now copy from tmp dir to ultimate destination From 40be4085aa663d771ac81e8317196dc5e7dca6f1 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Wed, 18 Mar 2026 14:57:07 +0100 Subject: [PATCH 2/5] remove comment --- android/titanium/libv8-services.js | 1 - 1 file changed, 1 deletion(-) diff --git a/android/titanium/libv8-services.js b/android/titanium/libv8-services.js index b2ffe00c346..dea05922367 100644 --- a/android/titanium/libv8-services.js +++ b/android/titanium/libv8-services.js @@ -259,7 +259,6 @@ async function updateLibrary() { + ' -Pcompression=bzip2' + ' -Psrc=' + quotePath(inFile) + ' -Pdest=' + quotePath(outDir); - // + ' -I ' + quotePath(path.join(__dirname, '..', 'untar.gradle')); return exec(untarCommandLine); }); // Now copy from tmp dir to ultimate destination From e389df363d7ade1ff47e50bfb43b1f2d1518ecf1 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Tue, 31 Mar 2026 14:53:45 +0200 Subject: [PATCH 3/5] improve gradle build --- android/gradle.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/gradle.properties b/android/gradle.properties index 0060c7f913b..a13848ab9a9 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -6,7 +6,10 @@ # -------------------------------------------------------------------------------- # Set max Java heap size for Gradle daemon process. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx2g + +# Enable parallel build execution +org.gradle.parallel=true # Enable usage of Google's AndroidX libraries. # Note: Jetifier is not needed for test app since it doesn't use Google's deprecated support libraries. From f5d0d7c8b3e8ada87dfedc2f0656900810409977 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Tue, 31 Mar 2026 14:55:09 +0200 Subject: [PATCH 4/5] another build file --- android/templates/build/root.build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/templates/build/root.build.gradle b/android/templates/build/root.build.gradle index 82d855a64c7..46ec4283269 100644 --- a/android/templates/build/root.build.gradle +++ b/android/templates/build/root.build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.13.2' + classpath 'com.android.tools.build:gradle:9.1.0' classpath 'com.google.gms:google-services:4.4.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" <% for (let i = 0; i < classpaths.length; i++) {%> From 40f9ca63892479a4fbcf719b4b4b07f6e66f20a2 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Tue, 31 Mar 2026 16:11:40 +0200 Subject: [PATCH 5/5] opt-out build-in kotlin --- android/cli/commands/_build.js | 2 ++ android/cli/commands/_buildModule.js | 2 ++ android/gradle.properties | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/android/cli/commands/_build.js b/android/cli/commands/_build.js index e3b90f34568..3d29239050d 100644 --- a/android/cli/commands/_build.js +++ b/android/cli/commands/_build.js @@ -2228,6 +2228,8 @@ class AndroidBuilder extends Builder { gradleProperties.push({ key: 'android.nonTransitiveRClass', value: 'false' }); gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory}` }); gradleProperties.push({ key: 'org.gradle.configuration-cache', value: 'true' }); + gradleProperties.push({ key: 'android.builtInKotlin', value: 'false' }); + gradleProperties.push({ key: 'android.newDsl', value: 'false' }); await gradlew.writeGradlePropertiesFile(gradleProperties); // Copy optional "gradle.properties" file contents from Titanium project to the above generated file. diff --git a/android/cli/commands/_buildModule.js b/android/cli/commands/_buildModule.js index 130b53caa54..1362020fec4 100644 --- a/android/cli/commands/_buildModule.js +++ b/android/cli/commands/_buildModule.js @@ -523,6 +523,8 @@ export class AndroidModuleBuilder extends Builder { gradleProperties.push({ key: 'android.useAndroidX', value: 'true' }); gradleProperties.push({ key: 'android.suppressUnsupportedCompileSdk', value: '35' }); gradleProperties.push({ key: 'android.nonTransitiveRClass', value: 'false' }); + gradleProperties.push({ key: 'android.builtInKotlin', value: 'false' }); + gradleProperties.push({ key: 'android.newDsl', value: 'false' }); 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 a13848ab9a9..e9ca630f63f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -17,3 +17,7 @@ android.useAndroidX=true android.enableJetifier=false android.nonTransitiveRClass=false android.suppressUnsupportedCompileSdk=35 + +# opt-out of build in kotlin (v9 feature) - need to be changed for Gradle 10 (smae in _build/_buildModule) +android.builtInKotlin=false +android.newDsl=false