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' 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.Launcher' } javafx { version = '11.0.2' modules = ['javafx.controls', 'javafx.fxml'] } dependencies { 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() } jar { manifest { attributes "Implementation-Title": project.name attributes "Implementation-Version": project.version attributes 'Main-Class': 'org.rococy.roomit.Launcher' } } 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 = 'RoomIt' } jpackage { appVersion = project.version icon = "icon/logo16x16.ico" imageName = "RoomIt" imageOptions = ["--vendor", "Rococy", "--description", "基于JavaFx开源的屏幕画笔工具"] } } jlinkZip { group = 'distribution' }