2022-09-07 16:40:43 +08:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'application'
|
|
|
|
id 'org.openjfx.javafxplugin' version '0.0.10'
|
|
|
|
id 'org.beryx.jlink' version '2.24.1'
|
|
|
|
}
|
|
|
|
|
|
|
|
group 'org.rococy'
|
2022-10-09 21:42:23 +08:00
|
|
|
version '1.0'
|
2022-09-07 16:40:43 +08:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
2022-10-05 10:22:23 +08:00
|
|
|
junitVersion = '5.9.0'
|
2022-09-07 16:40:43 +08:00
|
|
|
}
|
|
|
|
|
2022-10-06 15:41:10 +08:00
|
|
|
sourceCompatibility = "17"
|
|
|
|
targetCompatibility = "17"
|
2022-09-07 16:40:43 +08:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainModule = 'org.rococy.roomit'
|
2022-10-06 15:41:10 +08:00
|
|
|
mainClass = 'org.rococy.roomit.MainWindow'
|
2022-09-07 16:40:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
javafx {
|
|
|
|
version = '11.0.2'
|
|
|
|
modules = ['javafx.controls', 'javafx.fxml']
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-10-01 11:07:03 +08:00
|
|
|
implementation("com.google.code.gson:gson:2.9.1")
|
2022-10-05 10:22:23 +08:00
|
|
|
implementation('net.java.dev.jna:jna:5.12.1')
|
|
|
|
implementation('net.java.dev.jna:jna-platform:5.12.1')
|
2022-09-07 16:40:43 +08:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
|
|
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2022-10-09 21:42:23 +08:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes "Implementation-Title": project.name
|
|
|
|
attributes "Implementation-Version": '1.0'
|
|
|
|
attributes 'Main-Class': 'org.rococy.roomit.MainWindow'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-07 16:40:43 +08:00
|
|
|
jlink {
|
2022-10-05 10:22:23 +08:00
|
|
|
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") as RegularFile
|
2022-09-07 16:40:43 +08:00
|
|
|
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
|
|
|
|
launcher {
|
2022-10-12 10:06:16 +08:00
|
|
|
name = 'RoomIt'
|
2022-09-07 16:40:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jlinkZip {
|
|
|
|
group = 'distribution'
|
2022-10-01 11:07:03 +08:00
|
|
|
}
|