I have a project where both kotlin-compiler-embeddable
and kotlinx.coroutines
are used. Below is the current working (albeit stripped down) build.gradle
.
buildscript {
ext {
kotlinVersion = '1.1.51'
kotlinCoroutinesVersion = '0.19.3'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
}
}
apply plugin: 'kotlin'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinVersion")
compile("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
compile("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$kotlinCoroutinesVersion")
}
Today I tried to update to Kotlin 1.2.0:
kotlinVersion = '1.2.0'
kotlinCoroutinesVersion = '0.20'
In IDEA everything looks fine, however, when I tried to compile the project code like this had errors about No value passed for parameter 'context'
.
import kotlinx.coroutines.experimental.launch
launch { foo() }
After a bit of digging I noticed kotlin-compiler-embeddable
has started to ship with kotlinx.coroutines
version 0.14 (!)
While 0.14 seems to be working fine with slight changes to code (I didn’t do any extensive testing) it feels backwards to use such old version. Are there plans to update to more recent version or should I be using different dependencies or something?