This is an entry point for the compiler plugin. It can read command line arguments which are passed to it.
Extend the CommandLineProcessor class.
class NativeCommandLineProcessor : CommandLineProcessor { override val pluginId: String = "helloWorldPlugin" override val pluginOptions: Collection<CliOption> = listOf( CliOption( optionName = "enabled", valueDescription = "<true|false>", description = "whether to enable the plugin or not" ) ) override fun processOption( option: AbstractCliOption, value: String, configuration: CompilerConfiguration ) = when (option.optionName) { "enabled" -> configuration.put(KEY_ENABLED, value.toBoolean()) else -> configuration.put(KEY_ENABLED, true) } }
There was an error while loading. Please reload this page.