105 lines
2.9 KiB
Groovy
Executable File
105 lines
2.9 KiB
Groovy
Executable File
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
plugins {
|
|
id 'application'
|
|
id 'org.beryx.jlink' version "$jlink"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
flatDir {
|
|
dirs "${project(':demo').projectDir}/libs"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation "org.testfx:testfx-core:$testfx"
|
|
testImplementation "org.testfx:testfx-junit5:$testfx"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit"
|
|
testImplementation "org.junit.platform:junit-platform-suite-api:$junitSuite"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit"
|
|
|
|
implementation "io.github.palexdev:scenicview:$scenicView"
|
|
implementation("fr.brouillard.oss:cssfx:$cssfx") { exclude group: 'org.openjfx' }
|
|
implementation "org.kordamp.ikonli:ikonli-core:$ikonli"
|
|
implementation "org.kordamp.ikonli:ikonli-javafx:$ikonli"
|
|
implementation "org.kordamp.ikonli:ikonli-fontawesome5-pack:$ikonli"
|
|
implementation "io.github.palexdev:virtualizedfx:$vfx"
|
|
implementation project(':materialfx')
|
|
}
|
|
|
|
compileJava {
|
|
sourceCompatibility = "$testJdk"
|
|
targetCompatibility = "$testJdk"
|
|
}
|
|
|
|
compileTestJava {
|
|
moduleOptions {
|
|
compileOnClasspath = true
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
|
|
moduleOptions {
|
|
runOnClasspath = true
|
|
}
|
|
}
|
|
|
|
application {
|
|
setMainModule("MaterialFX.Demo")
|
|
String main = project.findProperty("chooseMain").toString()
|
|
if (main != "null" && !main.trim().isEmpty()) {
|
|
setMainClassName(main)
|
|
} else {
|
|
setMainClassName("io.github.palexdev.materialfx.demo.Demo")
|
|
}
|
|
applicationDefaultJvmArgs = ["-Dglass.disableGrab=true"]
|
|
}
|
|
|
|
jlink {
|
|
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
|
|
launcher {
|
|
mainClass = "io.github.palexdev.materialfx.demo.Demo"
|
|
name = 'MaterialFX Demo'
|
|
}
|
|
jpackage {
|
|
imageOptions = ['--icon', 'src/main/resources/logo.ico']
|
|
}
|
|
|
|
targetPlatform("linux-x64") {
|
|
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_x64.tar.gz")
|
|
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/linux_x64")
|
|
}
|
|
|
|
targetPlatform("win") {
|
|
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-win_x64.zip")
|
|
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/win_x64")
|
|
}
|
|
|
|
targetPlatform("mac") {
|
|
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_x64.tar.gz")
|
|
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/mac_x64")
|
|
}
|
|
|
|
addExtraDependencies('javafx')
|
|
}
|
|
|
|
tasks.register('doPackageAll') {
|
|
doLast {
|
|
if (Os.isFamily(Os.FAMILY_UNIX)) {
|
|
exec {
|
|
mkdir("$layout.buildDirectory/distributions")
|
|
executable "$rootDir/scripts/JLinkPackage.sh"
|
|
args = ["$layout.buildDirectory"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
jlinkZip.doLast {
|
|
doPackageAll
|
|
} |