/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java project to get you started. * For more details take a look at the Java Quickstart chapter in the Gradle * User Manual available at https://docs.gradle.org/5.6.2/userguide/tutorial_java_projects.html */ plugins { // Apply the java plugin to add support for Java id 'java' // Apply the application plugin to add support for building a CLI application id 'application' } repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() } distZip.enabled = false distTar.enabled = false sourceCompatibility = 8 targetCompatibility = 8 dependencies { if (JavaVersion.current() > JavaVersion.VERSION_1_8) { compileOnly("org.openjfx:javafx-base:11:win") compileOnly("org.openjfx:javafx-graphics:11:win") compileOnly("org.openjfx:javafx-controls:11:win") compileOnly("org.openjfx:javafx-swing:11:win") compileOnly("org.openjfx:javafx-fxml:11:win") compileOnly("org.openjfx:javafx-web:11:win") compileOnly("org.openjfx:javafx-media:11:win") // dep of -web compileOnly("org.openjfx:javafx-base:11:linux") compileOnly("org.openjfx:javafx-graphics:11:linux") compileOnly("org.openjfx:javafx-controls:11:linux") compileOnly("org.openjfx:javafx-swing:11:linux") compileOnly("org.openjfx:javafx-fxml:11:linux") compileOnly("org.openjfx:javafx-web:11:linux") compileOnly("org.openjfx:javafx-media:11:linux") // dep of -web } else { // Ensures classes are included for newer JVMs w/o FX runtimes compileOnly("com.dukescript.api:javafx.base:8.60.11") } // Use JUnit test framework testImplementation 'junit:junit:4.12' } mainClassName = 'example.java.app.Main' application { mainClassName = mainClassName } jar { archiveName "example-java-app.jar" manifest { attributes 'Manifest-Version': '1.0' attributes 'Main-Class': mainClassName //attributes 'SplashScreen-Image': 'splash.jpg' } from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } } run { systemProperty "jdk.gtk.version", "2" // Fix for crash in Wayland }