3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-25 15:50:12 +01:00

Add gradle task to quickly test/debug code changes (#902)

Dieser Commit ist enthalten in:
EnZaXD 2024-10-29 15:00:34 +01:00 committet von GitHub
Ursprung 368f450e11
Commit 3e8086e136
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 29 neuen und 1 gelöschten Zeilen

3
.gitignore vendored
Datei anzeigen

@ -107,3 +107,6 @@ nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
### Run Folder (ViaProxy) ###
common/run/

Datei anzeigen

@ -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()
}
}

Datei anzeigen

@ -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" }