37 lines
1.1 KiB
Groovy
37 lines
1.1 KiB
Groovy
plugins {
|
|
id 'application'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(":models") // We need this dependency for serializing persons to JSON
|
|
implementation project(":services") // We'll make use of the InMemoryPersonReader soon
|
|
|
|
implementation libs.javalin // Pulling in Javalin
|
|
implementation libs.jackson // For JSON serialization of persons
|
|
implementation libs.slf4j // To see some Javalin logging
|
|
}
|
|
|
|
application {
|
|
mainClass = "de.thpeetz.kontor.api.Main"
|
|
mainModule = "de.thpeetz.kontor.api"
|
|
}
|
|
|
|
task fatJar(type: Jar) {
|
|
manifest {
|
|
attributes 'Main-Class': 'de.thpeetz.kontor.api.Main'
|
|
//attributes (
|
|
// 'Main-Class': 'de.thpeetz.kontor.api.Main',
|
|
// 'Main-Module': 'de.thpeetz.kontor.api'
|
|
//)
|
|
}
|
|
//archiveBaseName = 'all-in-one-jar'
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
with jar
|
|
}
|
|
|
|
build.dependsOn fatJar
|
|
distZip.dependsOn fatJar
|
|
distTar.dependsOn fatJar
|
|
startScripts.dependsOn fatJar
|