plugins { id 'java-library' id 'application' id 'org.beryx.jlink' version '2.12.0' id 'org.openjfx.javafxplugin' version '0.0.10' id 'jacoco' } javafx { version = "11.0.2" modules = ['javafx.controls', 'javafx.fxml', 'javafx.base', 'javafx.graphics', 'javafx.media'] } group 'ch.unibas.dmi.dbis' version '0.0.2' mainClassName = 'ch.unibas.dmi.dbis.cs108.NightTrainToBudapest' java { //withJavadocJar() toolchain { languageVersion = JavaLanguageVersion.of(11) } } //adds maven central as a maven repository repositories { mavenCentral() } //adds all needed external libraries to gradle dependencies { implementation 'org.apache.logging.log4j:log4j-api:2.17.2' implementation 'org.apache.logging.log4j:log4j-core:2.17.2' implementation 'org.openjfx:javafx-controls:18' implementation 'org.apache.commons:commons-collections4:4.4' implementation 'org.openjfx:javafx:19-ea+5' implementation 'org.testng:testng:7.1.0' testImplementation('org.junit.jupiter:junit-jupiter:5.8.2') } test { useJUnitPlatform() } /* The following block adds both compile and runtime dependencies to the jar */ jar { manifest { attributes( 'Main-Class': mainClassName ) } from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } } javadoc { options.encoding = 'UTF-8' } tasks.register('build-cs108') { dependsOn jar dependsOn javadoc }