-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (71 loc) · 1.99 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
allprojects {
apply plugin: "java"
base {
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
group = project.maven_group ?: rootProject.maven_group
archivesName = project.maven_name ?: rootProject.maven_name
version = project.maven_version ?: rootProject.maven_version
}
repositories {
mavenCentral()
}
configurations {
include
implementation.extendsFrom include
api.extendsFrom include
}
jar {
dependsOn configurations.include
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.include.collect {
zipTree(it)
}
} {
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
}
from("LICENSE") {
rename { "${it}_${project.name ?: rootProject.name}" }
}
}
}
apply plugin: "idea"
repositories {
maven {
name = "ViaVersion"
url = "https://repo.viaversion.com"
}
}
dependencies {
implementation "net.raphimc:ViaProxy:3.3.6"
}
processResources {
inputs.property "version", project.version
filesMatching("viaproxy.yml") {
expand "version": project.version
}
}
idea {
module {
["run"].each {
excludeDirs << file("$it")
}
}
}
tasks.register("runViaProxy", JavaExec) {
dependsOn tasks.jar
mainClass = "net.raphimc.viaproxy.ViaProxy"
classpath = sourceSets.main.compileClasspath
workingDir = file("run")
jvmArgs = ["-DskipUpdateCheck"]
doFirst {
def pluginsDir = file("$workingDir/plugins")
pluginsDir.mkdirs()
file("$pluginsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
}
doLast {
file("$workingDir/plugins/${project.name}.jar").delete()
file("$workingDir/logs").deleteDir()
}
}