From 07eed8b2b8548ac129774d7d91bea576128068b3 Mon Sep 17 00:00:00 2001 From: Santos Zatarain Vera Date: Wed, 25 Aug 2021 18:43:40 -0500 Subject: [PATCH] Support the Java Module System through Automatic-Module-Name manifest entry (#2237). --- kotlinx-coroutines-core/build.gradle | 1 + ui/kotlinx-coroutines-javafx/build.gradle.kts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/kotlinx-coroutines-core/build.gradle b/kotlinx-coroutines-core/build.gradle index c45ca08cef..312f1b7e54 100644 --- a/kotlinx-coroutines-core/build.gradle +++ b/kotlinx-coroutines-core/build.gradle @@ -219,6 +219,7 @@ static def setupManifest(Jar jar) { jar.manifest { attributes "Premain-Class": "kotlinx.coroutines.debug.AgentPremain" attributes "Can-Retransform-Classes": "true" + attributes "Automatic-Module-Name": "kotlinx.coroutines.core" } } diff --git a/ui/kotlinx-coroutines-javafx/build.gradle.kts b/ui/kotlinx-coroutines-javafx/build.gradle.kts index 9e30590cea..8271785ccc 100644 --- a/ui/kotlinx-coroutines-javafx/build.gradle.kts +++ b/ui/kotlinx-coroutines-javafx/build.gradle.kts @@ -52,6 +52,12 @@ val jdk8Test by tasks.registering(Test::class) { dependsOn(checkJdk8) } +tasks.jar { + manifest { + attributes["Automatic-Module-Name"] = "kotlinx.coroutines.javafx" + } +} + tasks.build { dependsOn(jdk8Test) }