feat: fix build process for javafx and conveyor
This commit is contained in:
47
build.gradle
47
build.gradle
@@ -3,14 +3,16 @@ plugins {
|
||||
id 'application'
|
||||
id 'org.openjfx.javafxplugin' version '0.0.13'
|
||||
id 'dev.hydraulic.conveyor' version '1.4'
|
||||
id "org.panteleyev.jpackageplugin" version "1.5.2"
|
||||
}
|
||||
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.panteleyev.jpackage.ImageType
|
||||
|
||||
group 'com.lenis0012'
|
||||
version '1.0'
|
||||
|
||||
project.ext.lwjglVersion = "3.3.2-SNAPSHOT"
|
||||
project.ext.lwjglVersion = "3.3.2"
|
||||
switch (OperatingSystem.current()) {
|
||||
case OperatingSystem.LINUX:
|
||||
project.ext.lwjglNatives = "natives-linux"
|
||||
@@ -29,6 +31,7 @@ repositories {
|
||||
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"
|
||||
@@ -58,9 +61,9 @@ application {
|
||||
mainModule = 'oraksi'
|
||||
mainClass = 'com.lenis0012.oraksi.HelloApplication'
|
||||
applicationDefaultJvmArgs = [
|
||||
'--enable-preview', '--enable-native-access=oraksi',
|
||||
'--add-opens',
|
||||
'javafx.graphics/javafx.scene=oraksi'
|
||||
'--enable-preview',
|
||||
'--enable-native-access=oraksi',
|
||||
'--add-opens=javafx.graphics/javafx.scene=oraksi'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -75,3 +78,39 @@ javafx {
|
||||
version = '20'
|
||||
modules = ['javafx.controls', 'javafx.fxml']
|
||||
}
|
||||
|
||||
|
||||
task copyDependencies(type: Copy) {
|
||||
from configurations.runtimeClasspath
|
||||
into "build/jmods"
|
||||
}
|
||||
|
||||
task copyJar(type: Copy) {
|
||||
from tasks.jar
|
||||
into "build/jmods"
|
||||
}
|
||||
|
||||
jpackage {
|
||||
dependsOn("build", "copyDependencies", "copyJar")
|
||||
|
||||
appName = "Oraksi"
|
||||
appVersion = project.version.toString()
|
||||
vendor = "com.lenis0012"
|
||||
copyright = "Copyright (c) 2023 Lennart ten Wolde"
|
||||
// runtimeImage = System.getProperty("java.home")
|
||||
module = "oraksi/com.lenis0012.oraksi.HelloApplication"
|
||||
modulePaths = ["$buildDir/jmods"]
|
||||
destination = "$buildDir/dist"
|
||||
javaOptions = ["-Dfile.encoding=UTF-8", "--enable-preview", "--enable-native-access=oraksi", "--add-opens=javafx.graphics/javafx.scene=oraksi"]
|
||||
type = ImageType.APP_IMAGE
|
||||
|
||||
// mac {
|
||||
// icon = "icons/icons.icns"
|
||||
// }
|
||||
//
|
||||
// windows {
|
||||
// icon = "icons/icons.ico"
|
||||
// winMenu = true
|
||||
// winDirChooser = true
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user