alexey.tsvetkov
05/23/2017, 6:20 PMkotlin-android plugin is used, Kotlin tasks patch the pattern compile<VARIANT_NAME>Kotlin. Also when kotlin-android is used, tasks are created after configuration phase, so you can refer to tasks only in afterEvaluate block:
afterEvaluate {
compileDebugKotlin {
kotlinOptions {
// see the docs for the list of options <https://kotlinlang.org/docs/reference/using-gradle.html#attributes-specific-for-jvm>
}
}
}
2. Options can be set per project by using kotlinOptions extension in android block:
apply plugin: 'kotlin-android'
android {
kotlinOptions {
// ...
}
}
The list of options that can be set using DSL can be found here https://kotlinlang.org/docs/reference/using-gradle.html#attributes-specific-for-jvm
There is freeCompilerArgs for options that cannot be set using DSL