Skip to content

Commit

Permalink
feat: bump kotlin 1.9.24 & don't apply kotlin-android-extensions when…
Browse files Browse the repository at this point in the history
… kotlin >= 1.8.0
  • Loading branch information
erisu committed May 8, 2024
1 parent 0d14358 commit 9609409
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion framework/cdv-gradle-config-defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"GRADLE_VERSION": "7.6",
"MIN_BUILD_TOOLS_VERSION": "33.0.2",
"AGP_VERSION": "7.4.2",
"KOTLIN_VERSION": "1.8.0",
"KOTLIN_VERSION": "1.9.24",
"ANDROIDX_APP_COMPAT_VERSION": "1.6.1",
"ANDROIDX_WEBKIT_VERSION": "1.6.0",
"ANDROIDX_CORE_SPLASHSCREEN_VERSION": "1.0.0",
Expand Down
4 changes: 4 additions & 0 deletions framework/cordova.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Boolean isVersionValid(version) {
return !(new Version(version)).isEqual('0.0.0')
}

Boolean isVersionGreaterThanEqual(versionX, versionY) {
return (new Version(versionX)) >= (new Version(versionY))
}

String doFindLatestInstalledBuildTools(String minBuildToolsVersionString) {
def buildToolsDirContents
try {
Expand Down
6 changes: 5 additions & 1 deletion templates/project/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ apply plugin: 'com.android.application'

if (cordovaConfig.IS_GRADLE_PLUGIN_KOTLIN_ENABLED) {
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

if(!cdvHelpers.isVersionGreaterThanEqual(cordovaConfig.KOTLIN_VERSION, '1.8.0')) {
println "Kotlin version < 1.8.0 detected. Applying kotlin-android-extensions plugin."
apply plugin: 'kotlin-android-extensions'
}
}

buildscript {
Expand Down

0 comments on commit 9609409

Please sign in to comment.