Skip to content

Commit fb1d4dc

Browse files
authored
fix openjfx module
1 parent e6ab8e3 commit fb1d4dc

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

imgui-openjfx/build.gradle

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import static org.gradle.internal.os.OperatingSystem.current
2+
13
plugins {
24
id 'maven'
35
id 'java'
46
id "org.jetbrains.kotlin.jvm"
57
id "com.github.johnrengelman.shadow"
6-
id 'org.openjfx.javafxplugin' version '0.0.8'
8+
// id 'org.openjfx.javafxplugin' version '0.0.8'
79
}
810

911
ext.moduleName = "${group}.imgui_openjfx"
@@ -14,6 +16,11 @@ dependencies {
1416
implementation "$kx:uno-sdk:$uno_version"
1517
implementation "${kx}.glm:glm:$glm_version"
1618

19+
def platform = current().isWindows() ? 'win' : current().isLinux() ? 'linux' : 'mac'
20+
["base", "graphics"].each {
21+
implementation "org.openjfx:javafx-$it:11:$platform"
22+
}
23+
1724
[""].each {
1825
String natives = "org.lwjgl:lwjgl$it:$lwjgl_version:natives-$lwjgl_natives"
1926
runtime natives
@@ -75,9 +82,12 @@ compileTestKotlin {
7582
}
7683

7784
compileJava {
78-
dependsOn(':compileKotlin')
7985
doFirst {
80-
options.compilerArgs = ['--module-path', classpath.asPath,]
86+
// println("[$moduleName]classpath.asPath: $classpath.asPath")
87+
options.compilerArgs = [
88+
'--module-path', classpath.asPath,
89+
// '--add-modules', 'javafx.graphics',
90+
]
8191
classpath = files()
8292
}
83-
}
93+
}

0 commit comments

Comments
 (0)