Remove deprecated usages of CliOption in official compiler plugins
This commit is contained in:
@@ -18,10 +18,7 @@ package org.jetbrains.kotlin.noarg
|
||||
|
||||
import com.intellij.mock.MockProject
|
||||
import org.jetbrains.kotlin.codegen.extensions.ExpressionCodegenExtension
|
||||
import org.jetbrains.kotlin.compiler.plugin.CliOption
|
||||
import org.jetbrains.kotlin.compiler.plugin.CliOptionProcessingException
|
||||
import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
|
||||
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
|
||||
import org.jetbrains.kotlin.compiler.plugin.*
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.CompilerConfigurationKey
|
||||
import org.jetbrains.kotlin.container.StorageComponentContainer
|
||||
@@ -67,11 +64,11 @@ class NoArgCommandLineProcessor : CommandLineProcessor {
|
||||
override val pluginId = PLUGIN_ID
|
||||
override val pluginOptions = listOf(ANNOTATION_OPTION, PRESET_OPTION, INVOKE_INITIALIZERS_OPTION)
|
||||
|
||||
override fun processOption(option: CliOption, value: String, configuration: CompilerConfiguration) = when (option) {
|
||||
override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) = when (option) {
|
||||
ANNOTATION_OPTION -> configuration.appendList(ANNOTATION, value)
|
||||
PRESET_OPTION -> configuration.appendList(PRESET, value)
|
||||
INVOKE_INITIALIZERS_OPTION -> configuration.put(INVOKE_INITIALIZERS, value == "true")
|
||||
else -> throw CliOptionProcessingException("Unknown option: ${option.name}")
|
||||
else -> throw CliOptionProcessingException("Unknown option: ${option.optionName}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user