74 lines
1.7 KiB
Groovy
74 lines
1.7 KiB
Groovy
plugins {
|
|
id 'application'
|
|
id 'java'
|
|
id 'org.openjfx.javafxplugin' version '0.1.0'
|
|
}
|
|
|
|
group = 'ch.unibas.dmi.dbis'
|
|
version = '0.0.1-ALPHA'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass = 'ch.unibas.dmi.dbis.cs108.casono.Main'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
javafx {
|
|
version = "25.0.2"
|
|
modules = ['javafx.controls', 'javafx.fxml', 'javafx.base', 'javafx.graphics', 'javafx.web']
|
|
}
|
|
|
|
dependencies {
|
|
// Source: https://mvnrepository.com/artifact/org.apache.logging.log4j
|
|
implementation("org.apache.logging.log4j:log4j-api:2.25.3")
|
|
runtimeOnly("org.apache.logging.log4j:log4j-core:2.25.3")
|
|
|
|
// Source: https://mvnrepository.com/artifact/org.fusesource.jansi/jansi
|
|
runtimeOnly("org.fusesource.jansi:jansi:2.4.2")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.0")
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.named('jar', Jar) {
|
|
manifest {
|
|
attributes('Main-Class': application.mainClass.get())
|
|
}
|
|
}
|
|
|
|
|
|
tasks.register('fatJar', Jar) {
|
|
group = 'build'
|
|
description = 'Assembles a runnable fat JAR including runtime dependencies.'
|
|
|
|
archiveClassifier = 'all'
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
manifest {
|
|
attributes('Main-Class': application.mainClass.get())
|
|
}
|
|
|
|
// include your compiled classes/resources
|
|
from(sourceSets.main.output)
|
|
|
|
// make sure runtimeClasspath is resolved before we try to zipTree it
|
|
dependsOn(configurations.runtimeClasspath)
|
|
|
|
// unpack runtime deps into the jar
|
|
from({
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
})
|
|
}
|