Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-24 23:30:17 +01:00
Add gradle task to quickly test/debug code changes (#902)
Dieser Commit ist enthalten in:
Ursprung
368f450e11
Commit
3e8086e136
3
.gitignore
vendored
3
.gitignore
vendored
@ -107,3 +107,6 @@ nbdist/
|
||||
nbactions.xml
|
||||
nb-configuration.xml
|
||||
.nb-gradle/
|
||||
|
||||
### Run Folder (ViaProxy) ###
|
||||
common/run/
|
||||
|
@ -24,3 +24,27 @@ dependencies {
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
// 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")
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ checkerQual = "3.39.0"
|
||||
paper = "1.16.5-R0.1-SNAPSHOT"
|
||||
velocity = "3.1.1"
|
||||
fabricLoader = "0.11.6"
|
||||
|
||||
viaProxy = "3.3.5-SNAPSHOT"
|
||||
|
||||
[libraries]
|
||||
|
||||
@ -31,3 +31,4 @@ checkerQual = { group = "org.checkerframework", name = "checker-qual", version.r
|
||||
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
|
||||
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
|
||||
viaProxy = { group = "net.raphimc", name = "ViaProxy", version.ref = "viaProxy" }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren