Skip to content

Commit 0d114d9

Browse files
committed
Fix a dependency of integration-tests
This is a followup of unbundling kotlinx.coroutines, which needs to be explicitly included in the classpath.
1 parent e915b4a commit 0d114d9

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

docs/ksp2cmdline.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
KSP2 has 4 main classes, one for each platform: `KSPJvmMain`, `KSPJsMain`, `KSPNativeMain`, `KSPCommonMain`. They reside
44
in the same jars from the
5-
[artifacts.zip](https://github.com/google/ksp/releases/download/2.0.0-1.0.21/artifacts.zip) in the
6-
[release page](https://github.com/google/ksp/releases/tag/2.0.0-1.0.21):
7-
* `symbol-processing-aa-2.0.0-1.0.21.jar`
5+
[artifacts.zip](https://github.com/google/ksp/releases/download/2.0.21-1.0.26/artifacts.zip) in the
6+
[release page](https://github.com/google/ksp/releases/tag/2.0.21-1.0.26):
7+
* `symbol-processing-aa-2.0.21-1.0.26.jar`
88

99
and depend on:
10-
* `symbol-processing-common-deps-2.0.0-1.0.21.jar`
10+
* `symbol-processing-common-deps-2.0.21-1.0.26.jar`
1111

1212
You’ll also need the Kotlin runtime:
13-
* `kotlin-stdlib-2.0.0.jar`
13+
* `kotlin-stdlib-2.0.21.jar`
14+
* `kotlinx-coroutines-core-jvm-1.6.4.jar`
1415

1516
Taking `KSPJvmMain` for example,
1617

1718
```
1819
java -cp \
19-
kotlin-analysis-api-2.0.0-1.0.21.jar:common-deps-2.0.0-1.0.21.jar:symbol-processing-api-2.0.0-1.0.21.jar:kotlin-stdlib-2.0.0.jar \
20+
kotlin-analysis-api-2.0.21-1.0.26.jar:common-deps-2.0.21-1.0.26.jar:symbol-processing-api-2.0.21-1.0.26.jar:kotlin-stdlib-2.0.21.jar:kotlinx-coroutines-core-jvm-1.6.4.jar \
2021
com.google.devtools.ksp.cmdline.KSPJvmMain \
2122
-jvm-target 11 \
2223
-module-name=main \

docs/ksp2entrypoints.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Calling KSP2 In Programs
22

33
There are two flavors of KSP2 artifacts: `symbol-processing-aa` and `symbol-processing-aa-embeddable`. They are both
4-
uber jars that include almost all runtime dependencies except `kotlin-stdlib` and `symbol-processing-common-deps`.
5-
The `-embeddable` version is the regular version with all the runtime dependencies renamed, so that it can be used with
6-
a Kotlin compiler in the same classpath without name clash. When in doubt, use `symbol-processing-aa-embeddable`.
4+
uber jars that include almost all runtime dependencies except `kotlin-stdlib`, `kotlinx-coroutines` and
5+
`symbol-processing-common-deps`. The `-embeddable` version is the regular version with all the runtime dependencies
6+
renamed, so that it can be used with a Kotlin compiler in the same classpath without name clash. When in doubt, use
7+
`symbol-processing-aa-embeddable`.
78

89
Calling KSP2 consists of just 4 steps:
910
1. Load processors

integration-tests/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import kotlin.math.max
44
val junitVersion: String by project
55
val kotlinBaseVersion: String by project
66
val agpTestVersion: String by project
7+
val aaCoroutinesVersion: String by project
78

89
plugins {
910
kotlin("jvm")
@@ -18,6 +19,7 @@ dependencies {
1819
testImplementation(project(":symbol-processing"))
1920
testImplementation(project(":symbol-processing-cmdline"))
2021
testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
22+
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$aaCoroutinesVersion")
2123
}
2224

2325
fun Test.configureCommonSettings() {

0 commit comments

Comments
 (0)