All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tschuchort.compiletesting.KspTool.kt Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
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