Skip to content

Commit d7e36a2

Browse files
committed
Update dependencies for k2
1 parent d64d7d3 commit d7e36a2

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

build-logic/src/main/kotlin/kotlin-inject.multiplatform.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ tasks.withType<KotlinNpmInstallTask> {
7070
}
7171

7272
rootProject.the<NodeJsRootExtension>().apply {
73-
nodeVersion = "22.0.0-v8-canary20231127cbafc81f11"
74-
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
73+
version = "22.0.0-v8-canary20231127cbafc81f11"
74+
downloadBaseUrl = "https://nodejs.org/download/v8-canary"
7575
}
7676

7777
rootProject.tasks.withType<KotlinNpmInstallTask>().configureEach {

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
org.gradle.parallel=true
22
kotlin.mpp.stability.nowarn=true
33
kotlin.native.ignoreDisabledTargets=true
4-
org.gradle.jvmargs=-Xmx4G
4+
org.gradle.jvmargs=-Xmx4G
5+
ksp.useKSP2=false

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[versions]
22
kotlin-inject = "0.7.0-SNAPSHOT"
3-
kotlin = "1.9.22"
4-
ksp = "1.9.22-1.0.17"
3+
kotlin = "2.0.0-Beta4"
4+
ksp = "2.0.0-Beta4-1.0.19"
55
kotlinpoet = "1.16.0"
66
junit5 = "5.9.3"
7-
detekt = "1.23.4"
7+
detekt = "1.23.5"
88
[libraries]
99
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
1010
detekt-gradle = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
1111
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
1212
ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
1313
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
1414
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
15-
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.3.2" }
16-
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0-RC" }
17-
kotlinx-metadata-jvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", version = "0.7.0" }
18-
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.1" }
15+
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.4.0" }
16+
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0" }
17+
kotlinx-metadata-jvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", version = "0.9.0" }
18+
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.2" }
1919
jdk-compiler = { module = "io.earcam.wrapped:jdk.compiler", version = "1.8.132" }
2020
assertk = { module = "com.willowtreeapps.assertk:assertk", version = "0.28.0" }
2121
burst-junit4 = { module = "com.squareup.burst:burst-junit4", version = "1.2.0" }

kotlin-inject-compiler/test/src/main/kotlin/me/tatarka/inject/ProjectCompiler.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ProjectCompiler(
4343
fun compile(): TestCompilationResult {
4444
val result = TestCompilationResult(
4545
KotlinCompilation().apply {
46+
kotlincArguments = kotlincArguments + "-Xskip-prerelease-check"
4647
workingDir = this@ProjectCompiler.workingDir
4748
sources = sourceFiles
4849
when (target) {
@@ -108,4 +109,4 @@ class TestCompilationResult(private val result: CompilationResult) {
108109
get() = result.exitCode == KotlinCompilation.ExitCode.OK
109110

110111
fun output(kind: Diagnostic.Kind): String = result.messages.filterByKind(kind)
111-
}
112+
}

kotlin-inject-runtime/build.gradle.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ plugins {
99
kotlin {
1010
@OptIn(ExperimentalKotlinGradlePluginApi ::class)
1111
applyDefaultHierarchyTemplate {
12-
group("commonJs") {
13-
withJs()
14-
withWasm()
12+
common {
13+
group("commonJs") {
14+
withJs()
15+
withWasmJs()
16+
}
1517
}
1618
}
1719

kotlin-inject-runtime/src/nativeMain/kotlin/me/tatarka/inject/internal/LazyMap.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package me.tatarka.inject.internal
22

3-
import kotlinx.atomicfu.locks.ReentrantLock
3+
import kotlinx.atomicfu.locks.SynchronizedObject
44
import kotlinx.atomicfu.locks.withLock
55

66
private val NULL = Any()
77

88
actual class LazyMap {
99
private val map = mutableMapOf<String, Any>()
10-
private val lock = ReentrantLock()
10+
11+
// using SynchronizedObject instead of ReentrantLock because of https://github.com/Kotlin/kotlinx-atomicfu/issues/401
12+
private val lock = SynchronizedObject()
1113

1214
actual fun <T> get(key: String, init: () -> T): T {
1315
return lock.withLock {

0 commit comments

Comments
 (0)