brainwine/build.gradle
2023-01-26 23:22:33 +01:00

45 lines
1,006 B
Groovy

plugins {
id 'java'
}
ext {
mainClass = 'brainwine.Bootstrap'
workingDirectory = 'run'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.formdev:flatlaf-intellij-themes:3.0'
implementation 'com.formdev:flatlaf-extras:3.0'
implementation 'com.formdev:flatlaf:3.0'
implementation project(':api')
implementation project(':gameserver')
implementation project(':shared')
}
task dist(type: Jar) {
manifest {
attributes 'Multi-Release': 'true',
'Main-Class': project.ext.mainClass
}
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn configurations.runtimeClasspath
with jar
}
task run(type: JavaExec) {
mainClass = project.ext.mainClass
workingDir = project.ext.workingDirectory
classpath = sourceSets.main.runtimeClasspath
mkdir workingDir
}