[ci skip] Cleaned up runViaProxy gradle task

This commit is contained in:
RaphiMC 2024-10-29 12:37:45 +01:00
parent d653a5b9ae
commit f000cdb2c3
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -104,23 +104,23 @@ tasks.register("runViaProxy", JavaExec) {
dependsOn tasks.jar
def viaProxyConfiguration = configurations.create("viaProxy")
viaProxyConfiguration.dependencies.add(project.dependencies.create("net.raphimc:ViaProxy:3.3.4") {
viaProxyConfiguration.dependencies.add(dependencies.create("net.raphimc:ViaProxy:3.3.5-SNAPSHOT") {
transitive = false
})
mainClass = "net.raphimc.viaproxy.ViaProxy"
classpath viaProxyConfiguration
classpath = viaProxyConfiguration
workingDir = file("run")
doFirst {
def jarsDir = new File(workingDir, "jars")
def jarsDir = file("$workingDir/jars")
jarsDir.mkdirs()
new File(jarsDir, "${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
file("$jarsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
}
doLast {
new File(workingDir, "jars/${project.name}.jar").delete()
file("$workingDir/jars/${project.name}.jar").delete()
file("$workingDir/logs").deleteDir()
}
}