Skip to content

Commit 136eddb

Browse files
authored
Explicitly pull in AtomicFU dependency (#656)
In #649, I wrongfully assumed that the AtomicFU dependency workaround was no longer needed — it is still needed.
1 parent 7b369bd commit 136eddb

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath(libs.atomicfu)
7+
classpath(libs.atomicfu.gradle)
88
}
99
}
1010

core/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ kotlin {
2323

2424
sourceSets {
2525
commonMain.dependencies {
26-
api(project(":exceptions"))
2726
api(libs.kotlinx.coroutines.core)
2827
api(libs.uuid)
28+
api(project(":exceptions"))
2929
implementation(libs.tuulbox.collections)
30-
3130
}
3231

3332
commonTest.dependencies {
@@ -40,6 +39,11 @@ kotlin {
4039
api(libs.kotlinx.coroutines.android)
4140
implementation(libs.androidx.core)
4241
implementation(libs.androidx.startup)
42+
43+
// Workaround for AtomicFU plugin not automatically adding JVM dependency for Android.
44+
// https://github.com/Kotlin/kotlinx-atomicfu/issues/145
45+
implementation(libs.atomicfu)
46+
4347
implementation(libs.tuulbox.coroutines)
4448
}
4549
}

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[versions]
22
android-compile = "34"
33
android-min = "21"
4+
atomicfu = "0.23.2"
45
coroutines = "1.8.0"
56
jvm-toolchain = "11"
67
kotlin = "1.9.23"
@@ -9,7 +10,8 @@ tuulbox = "7.2.0"
910
[libraries]
1011
androidx-core = { module = "androidx.core:core-ktx", version = "1.12.0" }
1112
androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.1.1" }
12-
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version = "0.23.2" }
13+
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" }
14+
atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" }
1315
khronicle = { module = "com.juul.khronicle:khronicle-core", version = "0.1.0" }
1416
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
1517
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }

0 commit comments

Comments
 (0)