Skip to content

Commit

Permalink
Explicitly pull in AtomicFU dependency (#656)
Browse files Browse the repository at this point in the history
In #649, I wrongfully assumed that the AtomicFU dependency workaround
was no longer needed — it is still needed.
  • Loading branch information
twyatt authored Mar 21, 2024
1 parent 7b369bd commit 136eddb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath(libs.atomicfu)
classpath(libs.atomicfu.gradle)
}
}

Expand Down
8 changes: 6 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ kotlin {

sourceSets {
commonMain.dependencies {
api(project(":exceptions"))
api(libs.kotlinx.coroutines.core)
api(libs.uuid)
api(project(":exceptions"))
implementation(libs.tuulbox.collections)

}

commonTest.dependencies {
Expand All @@ -40,6 +39,11 @@ kotlin {
api(libs.kotlinx.coroutines.android)
implementation(libs.androidx.core)
implementation(libs.androidx.startup)

// Workaround for AtomicFU plugin not automatically adding JVM dependency for Android.
// https://github.com/Kotlin/kotlinx-atomicfu/issues/145
implementation(libs.atomicfu)

implementation(libs.tuulbox.coroutines)
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[versions]
android-compile = "34"
android-min = "21"
atomicfu = "0.23.2"
coroutines = "1.8.0"
jvm-toolchain = "11"
kotlin = "1.9.23"
Expand All @@ -9,7 +10,8 @@ tuulbox = "7.2.0"
[libraries]
androidx-core = { module = "androidx.core:core-ktx", version = "1.12.0" }
androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.1.1" }
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version = "0.23.2" }
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" }
atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" }
khronicle = { module = "com.juul.khronicle:khronicle-core", version = "0.1.0" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
Expand Down

0 comments on commit 136eddb

Please sign in to comment.