plugins { id 'java' id 'application' id 'org.javamodularity.moduleplugin' version '1.8.12' id 'org.openjfx.javafxplugin' version '0.0.13' id 'org.beryx.jlink' version '2.25.0' } group 'com.shr4pnel.minesweeper' version '1.0-SNAPSHOT' repositories { mavenCentral() } ext { junitVersion = '5.10.0' } sourceCompatibility = '21' targetCompatibility = '21' tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' } application { mainClass = 'com.shr4pnel.minesweeper.Main' } javafx { version = '21' modules = ['javafx.controls', 'javafx.fxml'] } dependencies { testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") implementation 'org.openjfx:javafx:23-ea+3' } test { useJUnitPlatform() } jlink { imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { name = 'app' } } jlinkZip { group = 'distribution' } jar { duplicatesStrategy(DuplicatesStrategy.EXCLUDE) manifest { attributes( 'Main-Class': 'com.shr4pnel.minesweeper.Main' ) } from { configurations.compileClasspath.filter { it.exists() }.collect { it.isDirectory() ? it : zipTree(it) } } exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' } mainClassName = "com.shr4pnel.minesweeper.Main"