Skip to content
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ org.gradle.parallel=true
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true
org.gradle.jvmargs=-Xmx4G
ksp.useKSP2=true
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
kotlin-inject = "0.8.1-SNAPSHOT"
kotlin = "2.1.20"
ksp = "2.1.20-2.0.0"
kotlin = "2.2.20"
ksp = "2.3.0"
kotlinpoet = "2.0.0"
junit5 = "5.9.3"
jvmTarget = "11"
Expand All @@ -13,9 +13,9 @@ detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting",
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.7.0" }
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.10.1" }
kotlin-metadata-jvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlin" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.9.0" }
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.2" }
kotlinx-wasm-browser = "org.jetbrains.kotlinx:kotlinx-browser:0.3"
jdk-compiler = { module = "io.earcam.wrapped:jdk.compiler", version = "1.8.132" }
Expand All @@ -38,4 +38,4 @@ kotlin-test-junit5 = ["junit5-api", "junit5-params", "kotlin-reflect"]
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
jmh = { id = "me.champeau.jmh", version = "0.6.6" }
changelog = { id = "org.jetbrains.changelog", version = "2.2.1" }
changelog = { id = "org.jetbrains.changelog", version = "2.2.1" }
2 changes: 2 additions & 0 deletions integration-tests/ksp-companion/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# needed until https://github.com/google/ksp/issues/2605 is actually resolved
kotlin.native.enableKlibsCrossCompilation=false
2 changes: 2 additions & 0 deletions integration-tests/ksp/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# needed until https://github.com/google/ksp/issues/2605 is actually resolved
kotlin.native.enableKlibsCrossCompilation=false
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlinx.coroutines.promise
/**
* Workaround to use suspending functions in unit tests
*/
@OptIn(DelicateCoroutinesApi::class)
@OptIn(DelicateCoroutinesApi::class, ExperimentalWasmJsInterop::class)
actual fun runTest(block: suspend (scope: CoroutineScope) -> Unit) {
GlobalScope.promise { block(this) }
}
}
1 change: 0 additions & 1 deletion integration-tests/ksp1-companion/.gitignore

This file was deleted.

46 changes: 0 additions & 46 deletions integration-tests/ksp1-companion/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion integration-tests/ksp1/.gitignore

This file was deleted.

79 changes: 0 additions & 79 deletions integration-tests/ksp1/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,14 @@ class ProjectCompiler(
workingDir = this@ProjectCompiler.workingDir
sources = sourceFiles

if (target == Target.KSP1) {
languageVersion = "1.9"
}

val ksp: KspTool.() -> Unit = {
options?.toMap()?.let { kspProcessorOptions.putAll(it) }
symbolProcessorProviders.add(InjectProcessorProvider())
symbolProcessorProviders.addAll(symbolProcessors)
}

when (target) {
Target.KSP1 -> configureKsp(useKsp2 = false, ksp)
Target.KSP2 -> configureKsp(useKsp2 = true, ksp)
Target.KSP2 -> configureKsp(ksp)
}
inheritClassPath = true
// work-around for https://github.com/ZacSweers/kotlin-compile-testing/issues/197
Expand Down Expand Up @@ -107,7 +102,6 @@ private fun String.matchLine(): DiagnosticSeverity? {
}

enum class Target {
KSP1,
KSP2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import org.junit.jupiter.params.provider.EnumSource
import java.io.File

private fun Target.unresolvedReference(reference: String) = when (this) {
Target.KSP1 -> "Unresolved reference: $reference"
Target.KSP2 -> "Unresolved reference '$reference'"
}

Expand Down
Loading