Skip to content

Commit cfcf451

Browse files
author
Santos Zatarain Vera
committed
Support the Java Module System through Automatic-Module-Name manifest entry (Kotlin#2237).
1 parent b5679ab commit cfcf451

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

kotlinx-coroutines-core/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ static def setupManifest(Jar jar) {
219219
jar.manifest {
220220
attributes "Premain-Class": "kotlinx.coroutines.debug.AgentPremain"
221221
attributes "Can-Retransform-Classes": "true"
222+
attributes "Automatic-Module-Name": "kotlinx.coroutines.core"
222223
}
223224
}
224225

@@ -247,8 +248,8 @@ task jvmLincheckTest(type: Test, dependsOn: compileTestKotlinJvm) {
247248
static void configureJvmForLincheck(task) {
248249
task.minHeapSize = '1g'
249250
task.maxHeapSize = '6g' // we may need more space for building an interleaving tree in the model checking mode
250-
task.jvmArgs = ['--add-opens', 'java.base/jdk.internal.misc=ALL-UNNAMED', // required for transformation
251-
'--add-exports', 'java.base/jdk.internal.util=ALL-UNNAMED'] // in the model checking mode
251+
task.jvmArgs = [ '--add-opens', 'java.base/jdk.internal.misc=ALL-UNNAMED', // required for transformation
252+
'--add-exports', 'java.base/jdk.internal.util=ALL-UNNAMED'] // in the model checking mode
252253
task.systemProperty 'kotlinx.coroutines.semaphore.segmentSize', '2'
253254
task.systemProperty 'kotlinx.coroutines.semaphore.maxSpinCycles', '1' // better for the model checking mode
254255
}

ui/kotlinx-coroutines-javafx/build.gradle.kts

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ val jdk8Test by tasks.registering(Test::class) {
5252
dependsOn(checkJdk8)
5353
}
5454

55+
tasks.jar {
56+
manifest {
57+
attributes["Automatic-Module-Name"] = "kotlinx.coroutines.javafx"
58+
}
59+
}
60+
5561
tasks.build {
5662
dependsOn(jdk8Test)
5763
}

0 commit comments

Comments
 (0)