Hello! I have my CommandLineProcessor defined like...
# compiler
p
Hello! I have my CommandLineProcessor defined like
Copy code
class 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
Copy code
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:
Copy code
e: Invalid argument: -myTest=1
Please help me to find out right way.
s
hey, iirc, it should be something like
-Pmy.test:myTest=1
or such
p
Hello, Andrei! Thanks! -P pluginmy.testmyTest=1 works!
s
yeah, so essentially it is
-Pplugin:${pluginId}:${key}=${value}