RoomIt/build.gradle

74 lines
1.6 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-13 12:43:56 +08:00
mainClass = 'org.rococy.roomit.Launcher'
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
2022-10-17 15:57:47 +08:00
attributes "Implementation-Version": project.version
2022-10-13 12:43:56 +08:00
attributes 'Main-Class': 'org.rococy.roomit.Launcher'
}
}
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
}
2022-10-17 15:57:47 +08:00
2022-10-14 08:13:27 +08:00
jpackage {
appVersion = project.version
icon = "icon/logo16x16.ico"
2022-10-14 17:09:39 +08:00
imageName = "RoomIt"
2022-10-17 15:57:47 +08:00
imageOptions = ["--vendor", "Rococy", "--description", "基于JavaFx开源的屏幕画笔工具"]
2022-10-14 08:13:27 +08:00
}
2022-09-07 16:40:43 +08:00
}
jlinkZip {
group = 'distribution'
2022-10-01 11:07:03 +08:00
}