2024-07-21 13:24:06 +02:00
|
|
|
plugins {
|
|
|
|
id "vaf.base-conventions"
|
|
|
|
|
2024-11-04 12:52:16 +01:00
|
|
|
id "net.raphimc.class-token-replacer" version "1.1.3"
|
2024-07-21 13:24:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-12-17 13:19:08 +01:00
|
|
|
compileOnly "com.google.guava:guava:33.4.0-jre"
|
2024-12-18 10:28:02 +01:00
|
|
|
compileOnly "io.netty:netty-handler:4.1.116.Final"
|
2024-07-21 13:24:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
classTokenReplacer {
|
|
|
|
property("\${version}", project.version)
|
2024-11-14 00:52:40 +01:00
|
|
|
property("\${impl_version}", "git-ViaAprilFools-${project.version}:${rootProject.latestCommitHash().get()}")
|
2024-07-21 13:24:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-29 14:56:19 +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("runViaProxy", JavaExec) {
|
|
|
|
dependsOn tasks.jar
|
|
|
|
|
|
|
|
def viaProxyConfiguration = configurations.create("viaProxy")
|
|
|
|
viaProxyConfiguration.dependencies.add(dependencies.create("net.raphimc:ViaProxy:3.3.5-SNAPSHOT") {
|
|
|
|
transitive = false
|
|
|
|
})
|
|
|
|
|
|
|
|
mainClass = "net.raphimc.viaproxy.ViaProxy"
|
|
|
|
classpath = viaProxyConfiguration
|
|
|
|
workingDir = file("run")
|
2024-10-30 19:26:22 +01:00
|
|
|
jvmArgs = ["-DskipUpdateCheck"]
|
2024-10-29 14:56:19 +01:00
|
|
|
|
|
|
|
doFirst {
|
|
|
|
def jarsDir = file("$workingDir/jars")
|
|
|
|
jarsDir.mkdirs()
|
|
|
|
file("$jarsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
|
|
|
|
}
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
file("$workingDir/jars/${project.name}.jar").delete()
|
|
|
|
file("$workingDir/logs").deleteDir()
|
|
|
|
}
|
2024-10-30 19:26:22 +01:00
|
|
|
}
|