File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ hs_err_pid*
14
14
.gradle /
15
15
build /
16
16
out /
17
+ common /run /
Original file line number Diff line number Diff line change @@ -17,3 +17,29 @@ sourceSets {
17
17
}
18
18
}
19
19
}
20
+
21
+ // Task to quickly test/debug code changes using https://github.com/ViaVersion/ViaProxy
22
+ // For further instructions see the ViaProxy repository README
23
+ tasks. register(" runViaProxy" , JavaExec ) {
24
+ dependsOn tasks. jar
25
+
26
+ def viaProxyConfiguration = configurations. create(" viaProxy" )
27
+ viaProxyConfiguration. dependencies. add(dependencies. create(" net.raphimc:ViaProxy:3.3.5-SNAPSHOT" ) {
28
+ transitive = false
29
+ })
30
+
31
+ mainClass = " net.raphimc.viaproxy.ViaProxy"
32
+ classpath = viaProxyConfiguration
33
+ workingDir = file(" run" )
34
+
35
+ doFirst {
36
+ def jarsDir = file(" $workingDir /jars" )
37
+ jarsDir. mkdirs()
38
+ file(" $jarsDir /${ project.name} .jar" ). bytes = tasks. jar. archiveFile. get(). asFile. bytes
39
+ }
40
+
41
+ doLast {
42
+ file(" $workingDir /jars/${ project.name} .jar" ). delete()
43
+ file(" $workingDir /logs" ). deleteDir()
44
+ }
45
+ }
You can’t perform that action at this time.
0 commit comments