Skip to content

Commit

Permalink
Update dependencies for k2
Browse files Browse the repository at this point in the history
  • Loading branch information
eygraber committed Mar 8, 2024
1 parent d64d7d3 commit d7e36a2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ tasks.withType<KotlinNpmInstallTask> {
}

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

rootProject.tasks.withType<KotlinNpmInstallTask>().configureEach {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
org.gradle.parallel=true
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true
org.gradle.jvmargs=-Xmx4G
org.gradle.jvmargs=-Xmx4G
ksp.useKSP2=false
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[versions]
kotlin-inject = "0.7.0-SNAPSHOT"
kotlin = "1.9.22"
ksp = "1.9.22-1.0.17"
kotlin = "2.0.0-Beta4"
ksp = "2.0.0-Beta4-1.0.19"
kotlinpoet = "1.16.0"
junit5 = "5.9.3"
detekt = "1.23.4"
detekt = "1.23.5"
[libraries]
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
detekt-gradle = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.3.2" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0-RC" }
kotlinx-metadata-jvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", version = "0.7.0" }
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.1" }
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.4.0" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0" }
kotlinx-metadata-jvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", version = "0.9.0" }
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.2" }
jdk-compiler = { module = "io.earcam.wrapped:jdk.compiler", version = "1.8.132" }
assertk = { module = "com.willowtreeapps.assertk:assertk", version = "0.28.0" }
burst-junit4 = { module = "com.squareup.burst:burst-junit4", version = "1.2.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ProjectCompiler(
fun compile(): TestCompilationResult {
val result = TestCompilationResult(
KotlinCompilation().apply {
kotlincArguments = kotlincArguments + "-Xskip-prerelease-check"
workingDir = this@ProjectCompiler.workingDir
sources = sourceFiles
when (target) {
Expand Down Expand Up @@ -108,4 +109,4 @@ class TestCompilationResult(private val result: CompilationResult) {
get() = result.exitCode == KotlinCompilation.ExitCode.OK

fun output(kind: Diagnostic.Kind): String = result.messages.filterByKind(kind)
}
}
8 changes: 5 additions & 3 deletions kotlin-inject-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ plugins {
kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi ::class)
applyDefaultHierarchyTemplate {
group("commonJs") {
withJs()
withWasm()
common {
group("commonJs") {
withJs()
withWasmJs()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package me.tatarka.inject.internal

import kotlinx.atomicfu.locks.ReentrantLock
import kotlinx.atomicfu.locks.SynchronizedObject
import kotlinx.atomicfu.locks.withLock

private val NULL = Any()

actual class LazyMap {
private val map = mutableMapOf<String, Any>()
private val lock = ReentrantLock()

// using SynchronizedObject instead of ReentrantLock because of https://github.com/Kotlin/kotlinx-atomicfu/issues/401
private val lock = SynchronizedObject()

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

0 comments on commit d7e36a2

Please sign in to comment.