Skip to content

Commit 323bce2

Browse files
committed
Sync build.gradle
1 parent 10452ce commit 323bce2

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

build.gradle

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
2-
id "java"
2+
id "java-library"
3+
id "idea"
34
}
45

56
base {
@@ -72,3 +73,31 @@ jar {
7273
rename { "${it}_${project.name ?: rootProject.name}" }
7374
}
7475
}
76+
77+
idea {
78+
module {
79+
["run"].each {
80+
excludeDirs << file("$it")
81+
}
82+
}
83+
}
84+
85+
tasks.register("runViaProxy", JavaExec) {
86+
dependsOn tasks.jar
87+
88+
mainClass = "net.raphimc.viaproxy.ViaProxy"
89+
classpath = sourceSets.main.compileClasspath
90+
workingDir = file("run")
91+
jvmArgs = ["-DskipUpdateCheck"]
92+
93+
doFirst {
94+
def pluginsDir = file("$workingDir/plugins")
95+
pluginsDir.mkdirs()
96+
file("$pluginsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
97+
}
98+
99+
doLast {
100+
file("$workingDir/plugins/${project.name}.jar").delete()
101+
file("$workingDir/logs").deleteDir()
102+
}
103+
}

0 commit comments

Comments
 (0)