94 lines
2.8 KiB
Groovy
94 lines
2.8 KiB
Groovy
|
|
plugins {
|
|
id "java-library"
|
|
id "com.gradleup.shadow" version "8.3.6"
|
|
}
|
|
|
|
configurations {
|
|
platformBukkit
|
|
platformBungee
|
|
platformVelocity
|
|
sqliteDriver
|
|
}
|
|
|
|
dependencies {
|
|
api project(":api")
|
|
api project(":core-config")
|
|
api project(":skin-cache")
|
|
api project(":backend-rpc-protocol")
|
|
api project(":voice-rpc-protocol")
|
|
api project(":supervisor-protocol")
|
|
platformBukkit project(":core:core-platform-bukkit")
|
|
platformBungee project(":core:core-platform-bungee")
|
|
platformVelocity project(":core:core-platform-velocity")
|
|
implementation(libs.asm)
|
|
compileOnly(libs.bundles.netty.all)
|
|
compileOnly(libs.jsr305)
|
|
compileOnly(libs.gson)
|
|
compileOnly(libs.guava)
|
|
compileOnly(libs.slf4j)
|
|
compileOnly(libs.skinsrestorer.api)
|
|
sqliteDriver project(":skin-cache:sqlite-jdbc-jar")
|
|
}
|
|
|
|
def embedSQLiteJar(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar taskIn) {
|
|
taskIn.dependsOn ":skin-cache:sqlite-jdbc-jar:jar"
|
|
configurations.sqliteDriver.each {
|
|
def phile = it
|
|
taskIn.from(phile.parentFile.absolutePath) {
|
|
include phile.name
|
|
rename phile.name, "net/lax1dude/eaglercraft/backend/skin_cache/libs/sqlite-jdbc.library"
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named("shadowJar", com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
|
|
group "shadow"
|
|
description "Builds the JAR for all supported platforms"
|
|
configurations = [
|
|
project.configurations.runtimeClasspath,
|
|
project.configurations.platformBukkit,
|
|
project.configurations.platformBungee,
|
|
project.configurations.platformVelocity
|
|
]
|
|
embedSQLiteJar(it)
|
|
archiveFileName = "EaglerXServer.jar"
|
|
relocate "org.objectweb.asm", "net.lax1dude.eaglercraft.backend.server.libs.asm"
|
|
}
|
|
|
|
tasks.register("shadowJarBukkit", com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
|
|
group "shadow"
|
|
description "Builds the JAR for Bukkit platforms"
|
|
configurations = [
|
|
project.configurations.runtimeClasspath,
|
|
project.configurations.platformBukkit
|
|
]
|
|
embedSQLiteJar(it)
|
|
archiveFileName = "EaglerXServer-Bukkit.jar"
|
|
relocate "org.objectweb.asm", "net.lax1dude.eaglercraft.backend.server.libs.asm"
|
|
}
|
|
|
|
tasks.register("shadowJarBungee", com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
|
|
group "shadow"
|
|
description "Builds the JAR for Bungee platforms"
|
|
configurations = [
|
|
project.configurations.runtimeClasspath,
|
|
project.configurations.platformBungee
|
|
]
|
|
embedSQLiteJar(it)
|
|
archiveFileName = "EaglerXServer-Bungee.jar"
|
|
relocate "org.objectweb.asm", "net.lax1dude.eaglercraft.backend.server.libs.asm"
|
|
}
|
|
|
|
tasks.register("shadowJarVelocity", com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
|
|
group "shadow"
|
|
description "Builds the JAR for Velocity platforms"
|
|
configurations = [
|
|
project.configurations.runtimeClasspath,
|
|
project.configurations.platformVelocity
|
|
]
|
|
embedSQLiteJar(it)
|
|
archiveFileName = "EaglerXServer-Velocity.jar"
|
|
relocate "org.objectweb.asm", "net.lax1dude.eaglercraft.backend.server.libs.asm"
|
|
}
|