aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-core/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'kotlinx-coroutines-core/build.gradle')
-rw-r--r--kotlinx-coroutines-core/build.gradle25
1 files changed, 16 insertions, 9 deletions
diff --git a/kotlinx-coroutines-core/build.gradle b/kotlinx-coroutines-core/build.gradle
index c2a57f9d..c45ca08c 100644
--- a/kotlinx-coroutines-core/build.gradle
+++ b/kotlinx-coroutines-core/build.gradle
@@ -3,6 +3,7 @@
*/
apply plugin: 'org.jetbrains.kotlin.multiplatform'
+apply plugin: 'org.jetbrains.dokka'
apply from: rootProject.file("gradle/compile-jvm-multiplatform.gradle")
apply from: rootProject.file("gradle/compile-common.gradle")
@@ -80,7 +81,7 @@ kotlin {
}
languageSettings {
progressiveMode = true
- experimentalAnnotations.each { useExperimentalAnnotation(it) }
+ optInAnnotations.each { useExperimentalAnnotation(it) }
}
}
@@ -200,16 +201,22 @@ jvmTest {
// Configure the IDEA runner for Lincheck
configureJvmForLincheck(jvmTest)
}
- // TODO: JVM IR generates different stacktrace so temporary disable stacktrace tests
- if (rootProject.ext.jvm_ir_enabled) {
- filter {
- excludeTestsMatching('kotlinx.coroutines.exceptions.StackTraceRecovery*')
- }
- }
}
-jvmJar {
- manifest {
+// Setup manifest for kotlinx-coroutines-core-jvm.jar
+jvmJar { setupManifest(it) }
+
+/*
+ * Setup manifest for kotlinx-coroutines-core.jar
+ * This is convenient for users that pass -javaagent arg manually and also is a workaround #2619 and KTIJ-5659.
+ * This manifest contains reference to AgentPremain that belongs to
+ * kotlinx-coroutines-core-jvm, but our resolving machinery guarantees that
+ * any JVM project that depends on -core artifact also depends on -core-jvm one.
+ */
+metadataJar { setupManifest(it) }
+
+static def setupManifest(Jar jar) {
+ jar.manifest {
attributes "Premain-Class": "kotlinx.coroutines.debug.AgentPremain"
attributes "Can-Retransform-Classes": "true"
}