I want to instruct my Kotlin annotation processor to change the output directory of the generated classes.
I want from my Gradle build script to change the kapt.kotlin.generated
argument. I have tried the following to no avail.
Doesn't work, path doesn't change
kapt { arguments { arg("kapt.kotlin.generated", new File('path')) } }
Doesn't work, path doesn't change
kapt { javacOptions { option("kapt.kotlin.generated", new File('path')) } }
Doesn't work, NullPointerException when building
kapt { javacOptions { option("-Akapt.kotlin.generated", new File('path')) } }
Same results for all three when using a string path instead of a file.
I am at a loss, any help would be appreciated.