58 lines
1.4 KiB
Groovy
58 lines
1.4 KiB
Groovy
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']
|
|
}
|
|
|
|
group 'ch.unibas.dmi.dbis'
|
|
version '0.0.2'
|
|
mainClassName = 'ch.unibas.dmi.dbis.cs108.NightTrainToBudapest'
|
|
|
|
java {
|
|
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.1'
|
|
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
|
|
implementation 'org.openjfx:javafx-controls:18'
|
|
implementation 'org.apache.commons:commons-collections4:4.4'
|
|
implementation 'org.openjfx:javafx:19-ea+5'
|
|
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) }
|
|
}
|
|
}
|