jvmMain.kapt.KaptExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluid-compiler-jvm Show documentation
Show all versions of fluid-compiler-jvm Show documentation
Compile Kotlin code and run Kapt annotation processing directly from Kotlin
package io.fluidsonic.compiler
import org.jetbrains.kotlin.base.kapt3.*
import org.jetbrains.kotlin.config.*
import org.jetbrains.kotlin.kapt3.*
import org.jetbrains.kotlin.kapt3.base.*
import org.jetbrains.kotlin.kapt3.base.incremental.*
import org.jetbrains.kotlin.kapt3.util.*
internal class KaptExtension(
compilerConfiguration: CompilerConfiguration,
logger: MessageCollectorBackedKaptLogger,
options: KaptOptions,
processors: Collection
) : AbstractKapt3Extension(
compilerConfiguration = compilerConfiguration,
logger = logger,
options = options
) {
private val processors = LoadedProcessors(
processors = processors.toList(),
classLoader = this::class.java.classLoader
)
override fun loadProcessors() =
processors
}