-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (84 loc) · 1.95 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
`java-library`
alias(libs.plugins.spotless)
alias(libs.plugins.lombok)
alias(libs.plugins.runpaper)
// alias(libs.plugins.userdev)
alias(libs.plugins.shadow)
alias(libs.plugins.paperyml)
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
}
dependencies {
// If you need nms, you can uncomment the paperweight lines
// This is not default because the compile time increases by a lot
// paperweight.paperDevBundle(libs.versions.minecraft)
compileOnly(libs.paper)
library(libs.bundles.cloud)
library(libs.configlib)
library(libs.guice)
library(libs.classgraph)
compileOnly(libs.invui)
}
spotless {
java {
target("**/*.java")
googleJavaFormat(libs.versions.googlejavaformat.get())
removeUnusedImports()
formatAnnotations()
trimTrailingWhitespace()
endWithNewline()
}
format("misc") {
target("*.gradle", "*.gradle.kts", "*.md", ".gitignore")
trimTrailingWhitespace()
indentWithTabs()
endWithNewline()
}
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
assemble {
// dependsOn(reobfJar)
}
jar {
enabled = false
}
shadowJar {
archiveClassifier.set("")
relocate("org.bstats", "de.rexlmanu.paperpluginstarter.dependencies.bstats")
from(file("LICENSE"))
dependencies {
exclude("META-INF/NOTICE")
exclude("META-INF/maven/**")
exclude("META-INF/versions/**")
exclude("META-INF/**.kotlin_module")
}
minimize()
}
runServer {
minecraftVersion(libs.versions.minecraftserver.get())
}
build {
dependsOn(shadowJar)
}
}
paper {
main = "de.rexlmanu.paperpluginstarter.StarterPlugin"
loader = "de.rexlmanu.paperpluginstarter.StarterLoader"
apiVersion = "1.19"
author = "Emmanuel Lampe | rexlManu <[email protected]>"
generateLibrariesJson = true
}