diff --git a/kokain-ksp/build.gradle b/kokain-ksp/build.gradle index b0a9d39..6a32c5e 100644 --- a/kokain-ksp/build.gradle +++ b/kokain-ksp/build.gradle @@ -47,7 +47,7 @@ dependencies { implementation("com.google.devtools.ksp:symbol-processing-api:1.9.21-1.0.15") testImplementation 'junit:junit:4.12' testImplementation project(path: ':kokain-core-api', configuration: 'default') - testImplementation 'com.github.tschuchortdev:kotlin-compile-testing-ksp:1.4.9' + testImplementation 'dev.zacsweers.kctfork:ksp:0.4.0' testImplementation 'org.mockito:mockito-core:1.10.19' implementation project(path: ':kokain-generator-lib', configuration: 'default') } \ No newline at end of file diff --git a/kokain-ksp/src/test/java/com/schwarz/kokain/ksp/KokainProcessorKotlinTest.kt b/kokain-ksp/src/test/java/com/schwarz/kokain/ksp/KokainProcessorKotlinTest.kt index 0f028bd..aa2d16b 100644 --- a/kokain-ksp/src/test/java/com/schwarz/kokain/ksp/KokainProcessorKotlinTest.kt +++ b/kokain-ksp/src/test/java/com/schwarz/kokain/ksp/KokainProcessorKotlinTest.kt @@ -1,11 +1,14 @@ package com.schwarz.kokain.ksp +import com.tschuchort.compiletesting.JvmCompilationResult import com.tschuchort.compiletesting.KotlinCompilation import com.tschuchort.compiletesting.SourceFile import com.tschuchort.compiletesting.symbolProcessorProviders +import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi import org.junit.Assert import org.junit.Test +@OptIn(ExperimentalCompilerApi::class) class KokainProcessorKotlinTest { @Test @@ -24,7 +27,7 @@ class KokainProcessorKotlinTest { Assert.assertEquals(KotlinCompilation.ExitCode.OK, compilation.exitCode) } - private fun compileKotlin(vararg sourceFiles: SourceFile): KotlinCompilation.Result { + private fun compileKotlin(vararg sourceFiles: SourceFile): JvmCompilationResult { return KotlinCompilation().apply { sources = sourceFiles.toMutableList() symbolProcessorProviders = listOf(KokainProcessorProvider())