Skip to content

Commit 2b60945

Browse files
committed
fixed Gradle JPMS
1 parent 821f8f3 commit 2b60945

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "org.jetbrains.kotlin.jvm" version "1.3.70"
33
}
44

5-
ext{
5+
ext {
66
moduleName = 'com.github.kotlin_graphics.kotlin_unsigned'
77
kotlin = 'org.jetbrains.kotlin:kotlin'
88
kotlintest_version = '3.4.2'
@@ -37,18 +37,18 @@ artifacts {
3737

3838
compileKotlin {
3939
// Enable Kotlin compilation to Java 8 class files with method parameter name metadata
40-
kotlinOptions{
40+
kotlinOptions {
4141
jvmTarget = "11"
4242
freeCompilerArgs = ["-XXLanguage:+InlineClasses"]
4343
// javaParameters = true
4444
}
4545
// As per https://stackoverflow.com/a/47669720
4646
// See also https://discuss.kotlinlang.org/t/kotlin-support-for-java-9-module-system/2499/9
47-
destinationDir = compileJava.destinationDir
47+
// destinationDir = compileJava.destinationDir
4848
}
4949

5050
compileTestKotlin {
51-
kotlinOptions{
51+
kotlinOptions {
5252
jvmTarget = "11"
5353
// javaParameters = true
5454
}
@@ -57,7 +57,9 @@ compileTestKotlin {
5757
compileJava {
5858
dependsOn(':compileKotlin')
5959
doFirst {
60-
options.compilerArgs = ['--module-path', classpath.asPath,]
60+
options.compilerArgs = [
61+
'--module-path', classpath.asPath,
62+
"--patch-module", "$moduleName=${sourceSets["main"].output.asPath}"]
6163
classpath = files()
6264
}
6365
}

0 commit comments

Comments
 (0)