-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
103 lines (79 loc) · 2.57 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
plugins() {
id("java")
id("com.github.johnrengelman.shadow").version("8.1.1")
id("checkstyle")
id("com.github.spotbugs").version("5.0.14")
id("org.cadixdev.licenser").version("0.6.1")
id("com.github.gmazzo.buildconfig").version("4.1.2") // Kotlin :skull:
}
this.group = "net.elytrium"
this.version = "1.2.4"
compileJava() {
sourceCompatibility = 17
targetCompatibility = 17
options.getRelease().set(17)
options.setEncoding("UTF-8")
}
repositories() {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "elytrium-repo"
url = "https://maven.elytrium.net/repo/"
}
maven {
name = "sonatype-oss-snapshots1"
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies() {
annotationProcessor("net.java.dev.jna:jna-platform:5.13.0")
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0")
compileOnly("com.github.spotbugs:spotbugs-annotations:4.7.3")
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
compileOnly("com.velocitypowered:velocity-proxy:3.3.0-SNAPSHOT") // From Elytrium Repo.
// Needs for some velocity methods.
compileOnly("io.netty:netty-transport:4.1.101.Final")
compileOnly("it.unimi.dsi:fastutil-core:8.5.12")
// To suppress VulnerableLibrariesLocal of velocity-api dependency.
compileOnly("org.yaml:snakeyaml:2.2")
implementation("net.elytrium.commons:kyori:1.3.0")
implementation("net.elytrium.commons:velocity:1.3.0")
implementation("net.elytrium.commons:utils:1.3.0")
implementation("net.elytrium:serializer:1.1.1")
implementation("net.elytrium:fastprepare:1.0.11")
implementation("org.bstats:bstats-velocity:3.0.2")
}
shadowJar() {
archiveClassifier = null
minimize()
enableRelocation = true
relocationPrefix = "net.elytrium.velocitytools.3rdparty"
}
checkstyle() {
toolVersion = "10.12.1"
configFile = file(".config/checkstyle/checkstyle.xml")
configProperties = ["configDirectory": "$rootDir/.config/checkstyle"]
maxErrors = 0
maxWarnings = 0
}
spotbugsMain() {
reports.register("html") {
required = true
outputLocation.fileValue(file("${project.layout.buildDirectory.get()}/reports/spotbugs/main/spotbugs.html"))
stylesheet = "fancy-hist.xsl"
}
}
license() {
header = file("HEADER.txt")
exclude("**/BuildConfig.java")
}
buildConfig() {
packageName("net.elytrium.velocitytools")
buildConfigField("String", "VERSION", "\"$version\"")
}
assemble.dependsOn(shadowJar)