Files
hamster-ball/ball-server/build.gradle

61 lines
2.0 KiB
Groovy

setArchivesBaseName("HamsterBall-Server")
evaluationDependsOn(':ball-common')
dependencies {
apiShade project(":ball-common") transitive false
shade "cn.hamster3.mc.plugin:core-common:${hamster_core_version}"
// // https://mvnrepository.com/artifact/org.slf4j/slf4j-api
// implementation 'org.slf4j:slf4j-api:2.0.3'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementationShade 'org.apache.logging.log4j:log4j-core:2.19.0'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl
implementationShade 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0'
// https://mvnrepository.com/artifact/io.netty/netty-all
implementationShade 'io.netty:netty-all:4.1.86.Final'
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
implementationShade 'org.yaml:snakeyaml:2.0'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
//noinspection GradlePackageUpdate
implementationShade 'com.google.code.gson:gson:2.8.9'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}
test {
useJUnitPlatform()
}
tasks.register("shadowJar", Jar) {
dependsOn("jar")
manifest.attributes('Main-Class': 'cn.hamster3.mc.plugin.ball.server.Bootstrap')
manifest.attributes('ball-version': project.version)
from([
tasks.jar.outputs.files.collect {
it.isDirectory() ? it : zipTree(it)
},
configurations.shade.collect {
it.isDirectory() ? it : zipTree(it)
},
configurations.apiShade.collect {
it.isDirectory() ? it : zipTree(it)
},
configurations.implementationShade.collect {
it.isDirectory() ? it : zipTree(it)
}
])
destinationDirectory = rootProject.buildDir
}
tasks {
compileJava {
dependsOn(":ball-common:build")
}
build {
dependsOn(shadowJar)
}
}