2021-02-18 14:34:33 +01:00
|
|
|
plugins {
|
2021-04-14 13:58:59 +02:00
|
|
|
id("net.kyori.blossom")
|
2023-09-06 03:30:10 +02:00
|
|
|
id("org.jetbrains.gradle.plugin.idea-ext")
|
2021-02-18 14:34:33 +01:00
|
|
|
}
|
|
|
|
|
2023-09-06 03:30:10 +02:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
blossom {
|
|
|
|
javaSources {
|
|
|
|
property("version", project.version.toString())
|
|
|
|
property("impl_version", "git-ViaBackwards-${project.version}:${rootProject.latestCommitHash()}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-18 14:34:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-04-14 13:58:59 +02:00
|
|
|
compileOnlyApi(libs.viaver)
|
|
|
|
compileOnlyApi(libs.netty)
|
|
|
|
compileOnlyApi(libs.guava)
|
|
|
|
compileOnlyApi(libs.checkerQual)
|
2021-05-29 09:32:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
2024-10-29 15:00:34 +01:00
|
|
|
|
|
|
|
// Task to quickly test/debug code changes using https://github.com/ViaVersion/ViaProxy
|
|
|
|
// For further instructions see the ViaProxy repository README
|
|
|
|
tasks.register<JavaExec>("runViaProxy") {
|
|
|
|
dependsOn(tasks.shadowJar)
|
|
|
|
|
|
|
|
val viaProxyConfiguration = configurations.create("viaProxy")
|
|
|
|
viaProxyConfiguration.dependencies.add(dependencies.create(rootProject.libs.viaProxy.get().copy().setTransitive(false)))
|
|
|
|
|
|
|
|
mainClass.set("net.raphimc.viaproxy.ViaProxy")
|
|
|
|
classpath = viaProxyConfiguration
|
|
|
|
workingDir = file("run")
|
2024-10-30 21:07:30 +01:00
|
|
|
jvmArgs = listOf("-DskipUpdateCheck")
|
|
|
|
|
|
|
|
if (System.getProperty("viaproxy.gui.autoStart") != null) {
|
|
|
|
jvmArgs("-Dviaproxy.gui.autoStart")
|
|
|
|
}
|
2024-10-29 15:00:34 +01:00
|
|
|
|
|
|
|
doFirst {
|
|
|
|
val jarsDir = file("$workingDir/jars")
|
|
|
|
jarsDir.mkdirs()
|
|
|
|
file("$jarsDir/${project.name}.jar").writeBytes(tasks.shadowJar.get().archiveFile.get().asFile.readBytes())
|
|
|
|
}
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
file("$workingDir/jars/${project.name}.jar").delete()
|
|
|
|
file("$workingDir/logs").deleteRecursively()
|
|
|
|
}
|
|
|
|
}
|