Skip to content

Commit 155ca07

Browse files
committed
Sync build.gradle
1 parent bc4a86d commit 155ca07

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

0 commit comments

Comments
 (0)