79 lines
2.2 KiB
Groovy
79 lines
2.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'org.openjfx.javafxplugin' version '0.0.13'
|
|
id 'dev.hydraulic.conveyor' version '1.4'
|
|
}
|
|
|
|
import org.gradle.internal.os.OperatingSystem
|
|
|
|
group 'com.lenis0012'
|
|
version '1.0'
|
|
|
|
project.ext.lwjglVersion = "3.3.2-SNAPSHOT"
|
|
switch (OperatingSystem.current()) {
|
|
case OperatingSystem.LINUX:
|
|
project.ext.lwjglNatives = "natives-linux"
|
|
break
|
|
case OperatingSystem.WINDOWS:
|
|
project.ext.lwjglNatives = "natives-windows"
|
|
break
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
maven { url "https://repo.eclipse.org/content/groups/releases/" }
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.jfxtras:jmetro:11.6.16'
|
|
implementation 'org.controlsfx:controlsfx:11.1.0'
|
|
implementation 'org.eclipse.fx:org.eclipse.fx.drift:1.0.0'
|
|
|
|
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
|
|
implementation "org.lwjgl:lwjgl"
|
|
implementation "org.lwjgl:lwjgl-glfw"
|
|
implementation "org.lwjgl:lwjgl-opengl"
|
|
implementation "org.lwjgl:lwjgl::$lwjglNatives"
|
|
implementation "org.lwjgl:lwjgl-glfw::$lwjglNatives"
|
|
implementation "org.lwjgl:lwjgl-opengl::$lwjglNatives"
|
|
|
|
implementation platform('org.kordamp.ikonli:ikonli-bom:12.3.1')
|
|
implementation 'org.kordamp.ikonli:ikonli-javafx'
|
|
implementation 'org.kordamp.ikonli:ikonli-fontawesome5-pack'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(20)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs += ["-parameters", "--enable-preview"]
|
|
}
|
|
|
|
application {
|
|
mainModule = 'oraksi'
|
|
mainClass = 'com.lenis0012.oraksi.HelloApplication'
|
|
applicationDefaultJvmArgs = [
|
|
'--enable-preview', '--enable-native-access=oraksi',
|
|
'--add-opens',
|
|
'javafx.graphics/javafx.scene=oraksi'
|
|
]
|
|
}
|
|
|
|
task runDemo(type: JavaExec) {
|
|
classpath = tasks.named('run').get().classpath
|
|
modularity.inferModulePath = false
|
|
mainModule = 'oraksi'
|
|
mainClass = 'com.lenis0012.oraksi.LwjglDemo'
|
|
}
|
|
|
|
javafx {
|
|
version = '20'
|
|
modules = ['javafx.controls', 'javafx.fxml']
|
|
}
|