plugins { id "vaf.base-conventions" id "net.raphimc.class-token-replacer" version "1.1.2" } dependencies { compileOnly "com.google.guava:guava:33.2.1-jre" compileOnly "io.netty:netty-handler:4.1.111.Final" } sourceSets { main { classTokenReplacer { property("\${version}", project.version) property("\${impl_version}", "git-ViaAprilFools-${project.version}:${rootProject.latestCommitHash()}") } } } // 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") 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() } }