PHondogo
05/22/2020, 9:49 AMclass CliProcessor : CommandLineProcessor {
override val pluginId = "my.test"
override val pluginOptions: Collection<AbstractCliOption> = listOf(
CliOption(
"myTest",
"<1|2>",
"Test option"
)
)
override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) {
super.processOption(option, value, configuration)
// DO smth
}
}
How can I pass my option from command line?
I'm passing it this way
private fun setKotlinCompilerArgs(options: KotlinCommonOptions) {
options.freeCompilerArgs += "-myTest=1"
}
I've tried several variants: --myTest=1, myTest=1, myTest:1, -myTest:1
But every time got error:
e: Invalid argument: -myTest=1
Please help me to find out right way.shikasd
05/22/2020, 10:03 AM-Pmy.test:myTest=1
or suchPHondogo
05/22/2020, 10:21 AMshikasd
05/22/2020, 11:05 AM-Pplugin:${pluginId}:${key}=${value}