numass-framework/numass-viewer/build.gradle.kts

87 lines
2.5 KiB
Plaintext
Raw Normal View History

2021-11-14 16:46:32 +03:00
plugins {
kotlin("jvm")
id("org.openjfx.javafxplugin")
2021-11-15 15:06:34 +03:00
//id("com.github.johnrengelman.shadow")
2021-11-14 21:30:31 +03:00
id("org.beryx.runtime") version "1.12.7"
2021-11-14 16:46:32 +03:00
application
}
javafx {
2021-11-15 15:06:34 +03:00
modules = listOf("javafx.graphics", "javafx.controls", "javafx.web")
2021-11-14 16:46:32 +03:00
version = "11"
}
repositories {
mavenCentral()
}
application {
mainClass.set("inr.numass.viewer.Viewer")
}
2021-11-29 14:24:39 +03:00
version = "0.6.1"
2021-11-14 16:46:32 +03:00
description = "The viewer for numass data"
dependencies {
api(project(":numass-core"))
api(project(":dataforge-plots:plots-jfc"))
api(project(":dataforge-gui"))
}
2021-11-14 21:30:31 +03:00
val addJvmArgs = listOf(
2021-11-16 19:46:39 +03:00
"-XX:+UseZGC",
2021-11-14 21:30:31 +03:00
"--add-exports=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED",
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED",
"--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED",
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED",
"--add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED",
)
2021-11-14 16:46:32 +03:00
application {
2021-11-14 21:30:31 +03:00
applicationDefaultJvmArgs = addJvmArgs
}
runtime {
addOptions("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
addModules(
"java.desktop",
"jdk.unsupported",
"java.scripting",
"java.logging",
"java.xml",
"javafx.graphics",
"javafx.controls"
2021-11-14 16:46:32 +03:00
)
2021-11-14 21:30:31 +03:00
jpackage {
2021-11-22 15:35:18 +03:00
//installerType = "deb"
2021-11-14 21:30:31 +03:00
jvmArgs = addJvmArgs
2021-11-17 18:25:09 +03:00
val currentOs = org.gradle.internal.os.OperatingSystem.current()
installerOptions = installerOptions + listOf("--vendor", "MIPT-NPM lab")
if (currentOs.isWindows) {
installerOptions = installerOptions + listOf(
"--win-menu",
"--win-menu-group", "Numass",
"--win-dir-chooser",
"--win-shortcut"
)
} else if (currentOs.isLinux) {
installerType = "deb"
installerOptions = installerOptions + listOf(
"--linux-package-name", "numass-viewer",
2021-11-29 10:48:03 +03:00
"--linux-shortcut",
2021-11-17 18:25:09 +03:00
"--linux-deb-maintainer", "nozik.aa@mipt.ru",
"--linux-menu-group", "Science",
"--linux-shortcut"
)
}
2021-11-14 21:30:31 +03:00
}
launcher {
jvmArgs = addJvmArgs
}
2021-11-14 16:46:32 +03:00
}