Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-16 04:50:08 +01:00
Add gradle task to quickly test/debug code changes (#4211)
Dieser Commit ist enthalten in:
Ursprung
7985b39ed5
Commit
a0c0b7eff2
5
.gitignore
vendored
5
.gitignore
vendored
@ -109,4 +109,7 @@ nb-configuration.xml
|
|||||||
.nb-gradle/
|
.nb-gradle/
|
||||||
|
|
||||||
### MacOS ###
|
### MacOS ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
### Run Folder ###
|
||||||
|
common/run/
|
||||||
|
@ -18,3 +18,26 @@ java {
|
|||||||
tasks.named<Jar>("sourcesJar") {
|
tasks.named<Jar>("sourcesJar") {
|
||||||
from(project(":viaversion-api").sourceSets.main.get().allSource)
|
from(project(":viaversion-api").sourceSets.main.get().allSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Task to quickly test/debug code changes using ViaProxy
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -19,7 +19,7 @@ checkerQual = "3.48.1"
|
|||||||
paper = "1.20.4-R0.1-SNAPSHOT"
|
paper = "1.20.4-R0.1-SNAPSHOT"
|
||||||
legacyBukkit = "1.8.8-R0.1-SNAPSHOT"
|
legacyBukkit = "1.8.8-R0.1-SNAPSHOT"
|
||||||
velocity = "3.1.1"
|
velocity = "3.1.1"
|
||||||
|
viaProxy = "3.3.5-SNAPSHOT"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ checkerQual = { group = "org.checkerframework", name = "checker-qual", version.r
|
|||||||
paper = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" }
|
paper = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" }
|
||||||
legacyBukkit = { group = "org.bukkit", name = "bukkit", version.ref = "legacyBukkit" }
|
legacyBukkit = { group = "org.bukkit", name = "bukkit", version.ref = "legacyBukkit" }
|
||||||
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||||
|
viaProxy = { group = "net.raphimc", name = "ViaProxy", version.ref = "viaProxy" }
|
||||||
|
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren