Experimental annotation revisit:
* Mark our API annotation as experimental with corresponding warning or error
* Get rid of workaround for new inference bug
* Migrate to compiler arguments instead of annotations
diff --git a/build.gradle b/build.gradle
index 3911a66..beb6e2d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -170,7 +170,7 @@
}
}
}
-
+
if (platform == "jvm") {
dokkaJavadoc.dependsOn project(":$coroutines_core").dokka
// dump declarations from main JVM module for binary-compatibility-validator
@@ -178,6 +178,16 @@
kotlinOptions.freeCompilerArgs += ["-Xdump-declarations-to=${buildDir}/visibilities.json"]
}
}
+
+
+ tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
+ kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental",
+ "-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference",
+ "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
+ "-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi",
+ "-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi"]
+
+ }
}
// main deployment task