RoomIt/build.gradle

69 lines
1.4 KiB
Groovy

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-SNAPSHOT'
repositories {
mavenCentral()
}
ext {
junitVersion = '5.9.0'
}
sourceCompatibility = "17"
targetCompatibility = "17"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'org.rococy.roomit'
mainClass = 'org.rococy.roomit.MainWindow'
}
javafx {
version = '11.0.2'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
implementation('com.jfoenix:jfoenix:9.0.10')
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')
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
test {
useJUnitPlatform()
}
jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") as RegularFile
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'app'
}
}
jlinkZip {
group = 'distribution'
}
// 打包排除的文件
sourceSets {
main {
// 排除resources静态资源文件夹里面的文件
resources {
exclude 'org/rococy/roomit/config.json'
}
}
}