KotlinCompiler and flag -A

#1

Hello, i have a gradle 3.5 project with kotlin plugin. If i use this code:
tasks.compileKotlin.kotlinOptions.freeCompilerArgs += [
“-AoutSrgFile=${srg.canonicalPath}”
]
I get error: “e: Invalid argument: -AoutSrgFile=myFolder” when building the project. The same code, but with compileJava works fine. How can I fix this problem? P.s. sorry for my bad english…

#2

In Gradle you can pass arguments to annotation processor with kapt block:

kapt {
    arguments {
        arg("key", "value")
    }
}
#3

Thanks, it work for me!