com.tschuchort.compiletesting.KspTool.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ksp Show documentation
Show all versions of ksp Show documentation
Kotlin Compile Testing (KSP)
package com.tschuchort.compiletesting
import com.google.devtools.ksp.processing.SymbolProcessorProvider
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
sealed interface KspTool {
val symbolProcessorProviders: MutableList
val processorOptions: MutableMap
var incremental: Boolean
var incrementalLog: Boolean
var allWarningsAsErrors: Boolean
var withCompilation: Boolean
var loggingLevels: Set
}
/** Gets or creates the [KspTool] if it doesn't exist. */
@OptIn(ExperimentalCompilerApi::class)
internal fun KotlinCompilation.getKspTool(): KspTool {
val ksp2Tool = precursorTools["ksp2"] as? Ksp2PrecursorTool?
return ksp2Tool ?: getKspRegistrar()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy