com.vk.compiler.plugin.recompose.highlighter.RecomposeHighlighterComponentRegistrar.kt Maven / Gradle / Ivy
package com.vk.compiler.plugin.recompose.highlighter
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.com.intellij.mock.MockProject
import org.jetbrains.kotlin.com.intellij.openapi.extensions.LoadingOrder
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.jetbrains.kotlin.config.CompilerConfiguration
@ExperimentalCompilerApi
class RecomposeHighlighterComponentRegistrar : ComponentRegistrar {
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
if (configuration.get(RecomposeHighlighterCommandLineProcessor.ENABLED, true)) {
project.extensionArea.getExtensionPoint(IrGenerationExtension.extensionPointName)
.registerExtension(RecomposeHighlighterIrGeneration(), LoadingOrder.FIRST, project)
}
}
override val supportsK2: Boolean = true
}