generated from 4drian3d/VelocityPluginTemplate
/
build.gradle.kts
53 lines (48 loc) · 1.51 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
plugins {
java
alias(libs.plugins.runvelocity)
alias(libs.plugins.blossom)
alias(libs.plugins.shadow)
}
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly(libs.velocity)
annotationProcessor(libs.velocity)
compileOnly(libs.authmevelocity)
implementation(libs.hikaricp) {
isTransitive = false
}
implementation(libs.h2database)
implementation(libs.configurate.hocon)
}
tasks {
build {
dependsOn(shadowJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
clean {
// Deletes the directory that is generated by the runVelocity plugin
delete("run")
}
runVelocity {
velocityVersion(libs.versions.velocity.get())
}
shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
relocate("com.zaxxer.hikari", "io.github._4drian3d.authmevelocity.lastserver.libs.hikari")
relocate("org.h2", "io.github._4drian3d.authmevelocity.lastserver.libs.h2")
relocate("org.spongepowered", "io.github._4drian3d.authmevelocity.lastserver.libs.sponge")
relocate("io.leangen.geantyref", "io.github._4drian3d.authmevelocity.lastserver.libs.geantyref")
}
}
blossom {
replaceTokenIn("src/main/java/io/github/_4drian3d/authmevelocity/lastserver/Constants.java")
replaceToken("{version}", project.version)
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))