mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-21 12:07:38 +01:00
Add gradle task to quickly test/debug code changes (#902)
This commit is contained in:
parent
368f450e11
commit
3e8086e136
3
.gitignore
vendored
3
.gitignore
vendored
@ -107,3 +107,6 @@ nbdist/
|
|||||||
nbactions.xml
|
nbactions.xml
|
||||||
nb-configuration.xml
|
nb-configuration.xml
|
||||||
.nb-gradle/
|
.nb-gradle/
|
||||||
|
|
||||||
|
### Run Folder (ViaProxy) ###
|
||||||
|
common/run/
|
||||||
|
@ -24,3 +24,27 @@ dependencies {
|
|||||||
java {
|
java {
|
||||||
withJavadocJar()
|
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"
|
paper = "1.16.5-R0.1-SNAPSHOT"
|
||||||
velocity = "3.1.1"
|
velocity = "3.1.1"
|
||||||
fabricLoader = "0.11.6"
|
fabricLoader = "0.11.6"
|
||||||
|
viaProxy = "3.3.5-SNAPSHOT"
|
||||||
|
|
||||||
[libraries]
|
[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" }
|
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
|
||||||
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||||
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
|
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
|
||||||
|
viaProxy = { group = "net.raphimc", name = "ViaProxy", version.ref = "viaProxy" }
|
||||||
|
Loading…
Reference in New Issue
Block a user