From 739a631dfff6e937cad93f75732c8bb6e12e99a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Thu, 9 May 2024 11:30:10 +0200 Subject: [PATCH] fix(android): fix kotlinVersion build issue also default ot 1.7.21 instead of 1.6.21 so compiles --- android/build.gradle | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 42cde2190..b5d61c457 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -13,11 +13,6 @@ def isNewArchitectureEnabled() { return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" } - -def getKotlinVersion() { - return rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : '1.6.21' -} - def getCoroutinesVersion(kotlinVersion) { return kotlinVersion >= '1.9' ? '1.8.0' : '1.6.4' } @@ -30,17 +25,15 @@ if (rootProject.ext.has('expoRNMapboxMapsVersion')) { rootProject.ext.set('RNMapboxMapsVersion', rootProject.ext.get('expoRNMapboxMapsVersion')) } -project.ext.set("kotlinVersion", getKotlinVersion()) - buildscript { repositories { google() mavenCentral() } - def kotlinVersion = this.kotlinVersion + project.ext.set("kotlinVersion", rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : '1.7.21') dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.kotlinVersion}" } } @@ -153,8 +146,8 @@ dependencies { // React Native implementation "com.facebook.react:react-native:+" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${safeExtGet('kotlinxCoroutinesCoreVersion', getCoroutinesVersion(getKotlinVersion()))}" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${safeExtGet('kotlinxCoroutinesAndroidVersion', getCoroutinesVersion(getKotlinVersion()))}" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${safeExtGet('kotlinxCoroutinesCoreVersion', getCoroutinesVersion(project.kotlinVersion))}" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${safeExtGet('kotlinxCoroutinesAndroidVersion', getCoroutinesVersion(project.kotlinVersion))}" // Mapbox SDK customizableDependencies('RNMapboxMapsLibs') {