brainwine/build.gradle
2022-08-14 00:20:24 +02:00

56 lines
1,021 B
Groovy

plugins {
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
implementation project(':api')
implementation project(':gameserver')
implementation project(':shared')
}
application {
mainClass = 'brainwine.Bootstrap'
}
run {
workingDir = file('run')
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveBaseName = 'brainwine'
manifest {
attributes 'Main-Class': application.mainClass,
'Multi-Release': 'true'
}
}
startScripts {
classpath = files('$APP_HOME/lib/*')
doLast {
windowsScript.text = windowsScript.text.replace('..', '')
unixScript.text = unixScript.text.replace('..', '')
}
}
distZip {
eachFile { file ->
if(file.path.contains('/bin/')) {
file.setPath(file.path.replace('bin/', ''))
}
}
}
distTar {
eachFile { file ->
if(file.path.contains('/bin/')) {
file.setPath(file.path.replace('bin/', ''))
}
}
}