@nanodeath Yes, you’ve described the correct way to use the flag. However the flag is intended only as a workaround just in case there is some case that cannot be fixed by other means.
We’ve changed the way Kotlin plugin searches the compiler:
- Previously it tried to find the compiler in Kotlin Gradle plugin dependencies. There is no way to do this reliably in Gradle, so the solution was fragile and slow.
- Since 1.2.60 Kotlin Gradle plugin resolves ‘kotlinCompilerClasspath’ configuration in each subproject it is applied to. By default
kotlinCompilerClasspathresolves ‘org.jetbrains.kotlin:kotlin-compiler-embeddable:<PLUGIN_VERSION>’ artifact in each subproject with kotlin plugin. If project usesmavenCentralorjcenterrepositories, then everything should work. If something breaks, then a subproject does not use these repositories, but that also means that it cannot resolve ‘org.jetbrains.kotlin:kotlin-stdlib’ from these repositories either. So if you usemavenCentralorjcenter, then you should just add them to problematic subprojects.
The dependency should resolve through mavenCentral, but only trough project repository, not buildscript one.
Won’t work:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.60'
}
}
apply plugin: 'kotlin'
Should work:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.60'
}
}
apply plugin: 'kotlin'
repositories {
// this repo should be available in every subproject that uses kotlin
mavenCentral() // or jcentrer
}