Skip to content

Commit 62a7f39

Browse files
committed
feat: bump kotlin 1.9.24 & don't apply kotlin-android-extensions when kotlin >= 1.8.0
1 parent 0e19966 commit 62a7f39

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

framework/cdv-gradle-config-defaults.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"GRADLE_VERSION": "8.7",
66
"MIN_BUILD_TOOLS_VERSION": "34.0.0",
77
"AGP_VERSION": "8.3.0",
8-
"KOTLIN_VERSION": "1.8.0",
8+
"KOTLIN_VERSION": "1.9.24",
99
"ANDROIDX_APP_COMPAT_VERSION": "1.6.1",
1010
"ANDROIDX_WEBKIT_VERSION": "1.6.0",
1111
"ANDROIDX_CORE_SPLASHSCREEN_VERSION": "1.0.0",

framework/cordova.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Boolean isVersionValid(version) {
4343
return !(new Version(version)).isEqual('0.0.0')
4444
}
4545

46+
Boolean isVersionGreaterThanEqual(versionX, versionY) {
47+
return (new Version(versionX)) >= (new Version(versionY))
48+
}
49+
4650
String doFindLatestInstalledBuildTools(String minBuildToolsVersionString) {
4751
def buildToolsDirContents
4852
try {

templates/project/app/build.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ apply plugin: 'com.android.application'
2121

2222
if (cordovaConfig.IS_GRADLE_PLUGIN_KOTLIN_ENABLED) {
2323
apply plugin: 'kotlin-android'
24-
apply plugin: 'kotlin-android-extensions'
24+
25+
if(!cdvHelpers.isVersionGreaterThanEqual(cordovaConfig.KOTLIN_VERSION, '1.8.0')) {
26+
println "Kotlin version < 1.8.0 detected. Applying kotlin-android-extensions plugin."
27+
apply plugin: 'kotlin-android-extensions'
28+
}
2529
}
2630

2731
buildscript {

0 commit comments

Comments
 (0)