Skip to content

Commit

Permalink
WIP: KSP2
Browse files Browse the repository at this point in the history
  • Loading branch information
eygraber committed Feb 8, 2024
1 parent d7a56a6 commit e7e20e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.parallel=true
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true
org.gradle.jvmargs=-Xmx4G
ksp.useKSP2=false
ksp.useKSP2=true
5 changes: 4 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
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" }
ksp-cli = { module = "com.google.devtools.ksp:symbol-processing-cmdline", version.ref = "ksp" }
ksp-aa-embeddable = { module = "com.google.devtools.ksp:symbol-processing-aa-embeddable", version.ref = "ksp" }
ksp-commonDeps = { module = "com.google.devtools.ksp:symbol-processing-common-deps", 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.4.0" }
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:ksp", version = "0.5.0-alpha03" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0-RC2" }
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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.google.devtools.ksp.processing.SymbolProcessorProvider
import com.tschuchort.compiletesting.CompilationResult
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspArgs
import com.tschuchort.compiletesting.kspProcessorOptions
import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import me.tatarka.inject.compiler.Options
Expand Down Expand Up @@ -48,7 +48,7 @@ class ProjectCompiler(
sources = sourceFiles
when (target) {
Target.KSP -> {
options?.toMap()?.let { kspArgs.putAll(it) }
options?.toMap()?.let { kspProcessorOptions.putAll(it) }
symbolProcessorProviders = mutableListOf<SymbolProcessorProvider>().apply {
add(InjectProcessorProvider())
addAll(symbolProcessors)
Expand Down

0 comments on commit e7e20e7

Please sign in to comment.