mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-07 19:07:35 +01:00
47 lines
1.3 KiB
Groovy
47 lines
1.3 KiB
Groovy
plugins {
|
|
id "vaf.base-conventions"
|
|
|
|
id "net.raphimc.class-token-replacer" version "1.1.3"
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "com.google.guava:guava:33.3.1-jre"
|
|
compileOnly "io.netty:netty-handler:4.1.115.Final"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
classTokenReplacer {
|
|
property("\${version}", project.version)
|
|
property("\${impl_version}", "git-ViaAprilFools-${project.version}:${rootProject.latestCommitHash().get()}")
|
|
}
|
|
}
|
|
}
|
|
|
|
// 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")
|
|
jvmArgs = ["-DskipUpdateCheck"]
|
|
|
|
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()
|
|
}
|
|
}
|