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

fix(android): fix kotlinVersion build issue also default ot 1.7.21 in… #3482

Merged
merged 1 commit into from
May 9, 2024
Merged
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
15 changes: 4 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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}"
}
}

Expand Down Expand Up @@ -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') {
Expand Down
Loading