diff --git a/plugins/sam-with-receiver/sam-with-receiver.cli/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPlugin.kt b/plugins/sam-with-receiver/sam-with-receiver.cli/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPlugin.kt index 8f678291bdd..8fe595e1036 100644 --- a/plugins/sam-with-receiver/sam-with-receiver.cli/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPlugin.kt +++ b/plugins/sam-with-receiver/sam-with-receiver.cli/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPlugin.kt @@ -15,9 +15,12 @@ import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.extensions.StorageComponentContainerContributor import org.jetbrains.kotlin.platform.TargetPlatform import org.jetbrains.kotlin.platform.jvm.isJvm -import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverCommandLineProcessor.Companion.SUPPORTED_PRESETS +import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverPluginNames.SUPPORTED_PRESETS import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverConfigurationKeys.ANNOTATION import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverConfigurationKeys.PRESET +import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverPluginNames.ANNOTATION_OPTION_NAME +import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverPluginNames.PLUGIN_ID +import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverPluginNames.PRESET_OPTION_NAME object SamWithReceiverConfigurationKeys { val ANNOTATION: CompilerConfigurationKey> = CompilerConfigurationKey.create("annotation qualified name") @@ -27,19 +30,15 @@ object SamWithReceiverConfigurationKeys { class SamWithReceiverCommandLineProcessor : CommandLineProcessor { companion object { - val SUPPORTED_PRESETS = emptyMap>() - val ANNOTATION_OPTION = CliOption( - "annotation", "", "Annotation qualified names", + ANNOTATION_OPTION_NAME, "", "Annotation qualified names", required = false, allowMultipleOccurrences = true ) val PRESET_OPTION = CliOption( - "preset", "", "Preset name (${SUPPORTED_PRESETS.keys.joinToString()})", + PRESET_OPTION_NAME, "", "Preset name (${SUPPORTED_PRESETS.keys.joinToString()})", required = false, allowMultipleOccurrences = true ) - - val PLUGIN_ID = "org.jetbrains.kotlin.samWithReceiver" } override val pluginId = PLUGIN_ID diff --git a/plugins/sam-with-receiver/sam-with-receiver.common/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPluginNames.kt b/plugins/sam-with-receiver/sam-with-receiver.common/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPluginNames.kt new file mode 100644 index 00000000000..fc412a56f19 --- /dev/null +++ b/plugins/sam-with-receiver/sam-with-receiver.common/src/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverPluginNames.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.samWithReceiver + +object SamWithReceiverPluginNames { + const val PLUGIN_ID = "org.jetbrains.kotlin.samWithReceiver" + const val ANNOTATION_OPTION_NAME = "annotation" + const val PRESET_OPTION_NAME = "preset" + + val SUPPORTED_PRESETS = emptyMap>() +}