RoomIt/build.gradle

67 lines
1.4 KiB
Groovy
Raw Normal View History

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'
version '1.0'
2022-09-07 16:40:43 +08:00
repositories {
mavenCentral()
}
ext {
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")
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()
}
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 {
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 {
name = 'RoomIt'
2022-09-07 16:40:43 +08:00
}
}
jlinkZip {
group = 'distribution'
2022-10-01 11:07:03 +08:00
}