forked from 4drian3d/UnSignedVelocity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
65 lines (59 loc) · 1.71 KB
/
build.gradle.kts
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
plugins {
java
alias(libs.plugins.blossom)
alias(libs.plugins.runvelocity)
alias(libs.plugins.shadow)
}
val packetEventsVersion = libs.versions.packetevents.get()
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.william278.net/velocity/")
maven("https://repo.codemc.io/repository/maven-releases/")
}
dependencies {
implementation(libs.bstats)
compileOnly(libs.velocity.api)
compileOnly(libs.velocity.proxy)
annotationProcessor(libs.velocity.api)
compileOnly(libs.packetevents)
}
sourceSets {
main {
blossom {
javaSources {
property("version", project.version.toString())
}
}
}
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
build {
dependsOn(shadowJar)
}
clean {
delete("run")
}
shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
relocate("org.bstats", "io.github._4drian3d.unsignedvelocity.libs.bstats")
minimize()
}
runVelocity {
downloadPlugins {
if (packetEventsVersion.contains("SNAPSHOT")) {
url("https://ci.codemc.io/job/retrooper/job/packetevents/lastSuccessfulBuild/artifact/velocity/build/libs/packetevents-velocity-$packetEventsVersion.jar")
} else {
github("retrooper", "packetevents", "v$packetEventsVersion",
"packetevents-velocity-$packetEventsVersion.jar"
)
}
}
velocityVersion(libs.versions.velocity.get())
}
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))