com.vk.compiler.plugin.recompose.highlighter.RecomposeHighlighterCommandLineProcessor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compiler-plugin Show documentation
Show all versions of compiler-plugin Show documentation
Utilities for Jetpack Compose
The newest version!
package com.vk.compiler.plugin.recompose.highlighter
import org.jetbrains.kotlin.compiler.plugin.AbstractCliOption
import org.jetbrains.kotlin.compiler.plugin.CliOption
import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.config.CompilerConfigurationKey
@OptIn(ExperimentalCompilerApi::class)
class RecomposeHighlighterCommandLineProcessor : CommandLineProcessor {
override val pluginId: String = "com.vk.recompose-highlighter.compiler-plugin"
override val pluginOptions: Collection =
listOf(
CliOption(
"enabled",
"",
"Is Recompose Highlighter enabled",
required = false
)
)
override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) {
when (option.optionName) {
"enabled" -> configuration.put(ENABLED, value.toBoolean())
}
}
companion object {
val ENABLED = CompilerConfigurationKey("Enable Recompose Highlighter")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy