Skip to content

Commit 7ca3603

Browse files
committed
Use a local copy of Kotlin Compile Testing
tschuchortdev/kotlin-compile-testing#394 works as needed, but isn't released. This unblocks Poko from that release.
1 parent 20b3737 commit 7ca3603

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
androidx-compose-compiler = "1.5.4-dev-k1.9.20-Beta2-ac5f960bdaf"
55
androidx-compose-runtime = "1.5.4"
66
kotlin = "1.9.20-Beta2"
7-
kotlinCompileTesting = "1.5.0"
7+
# If this ends with "-local", we use a checked-in jar instead of the public artifact:
8+
kotlinCompileTesting = "1.5.1-pr394-local"
89
kotlinCompileTestingFork = "0.3.2"
910
# https://github.com/google/ksp/releases:
1011
ksp = "1.9.20-Beta2-1.0.13"

poko-compiler-plugin/build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ dependencies {
2020

2121
testImplementation(project(":poko-annotations"))
2222
testImplementation(libs.kotlin.embeddableCompiler)
23-
testImplementation(libs.kotlin.compileTesting)
2423
testImplementation(libs.junit)
2524
testImplementation(libs.assertk)
2625
testImplementation(libs.testParameterInjector)
26+
val kctVersion = libs.versions.kotlinCompileTesting.get()
27+
if (kctVersion.endsWith("-local")) {
28+
// Include the local KCT jar and its copied dependencies
29+
val kctName = libs.kotlin.compileTesting.get().name
30+
testImplementation(files("libs/$kctName-$kctVersion.jar"))
31+
// Copied from KCT's build.gradle:
32+
testImplementation("com.squareup.okio:okio:3.3.0")
33+
testImplementation("io.github.classgraph:classgraph:4.8.158")
34+
testImplementation("org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:${libs.versions.kotlin.get()}")
35+
} else {
36+
testImplementation(libs.kotlin.compileTesting)
37+
}
2738
}
2839

2940
tasks.withType<KotlinCompile>().configureEach {
Binary file not shown.

0 commit comments

Comments
 (0)