-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
108 lines (91 loc) · 2.68 KB
/
build.gradle.kts
File metadata and controls
108 lines (91 loc) · 2.68 KB
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
104
105
106
107
108
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.plugins.quality.Checkstyle
import org.gradle.testing.jacoco.tasks.JacocoReport
plugins {
java
checkstyle
jacoco
id("com.gradleup.shadow") version "9.4.1"
id("net.kyori.blossom") version "2.2.0"
}
group = "nl.hauntedmc.velocityhotreloader"
val dependencyDir = "${group}.velocity.dependencies"
version = "1.2.1"
val javaVersion = 21
val checkstyleVersion = "13.3.0"
java {
java.toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
checkstyle {
toolVersion = checkstyleVersion
configFile = file("config/checkstyle/checkstyle.xml")
isShowViolations = true
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") {
name = "papermc"
}
}
dependencies {
implementation("net.kyori:adventure-text-minimessage:5.0.1") {
exclude("net.kyori", "adventure-api")
}
implementation("com.google.code.gson:gson:2.13.2")
compileOnly("com.mojang:brigadier:1.0.500")
compileOnly("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
compileOnly("com.electronwill.night-config:toml:3.8.4")
annotationProcessor("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
testImplementation(platform("org.junit:junit-bom:6.0.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.mockito:mockito-junit-jupiter:5.23.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
testImplementation("com.electronwill.night-config:toml:3.8.4")
}
sourceSets {
main {
blossom {
javaSources {
property("version", version.toString())
}
}
}
}
tasks {
build {
dependsOn("shadowJar")
}
compileJava {
options.release.set(javaVersion)
options.encoding = Charsets.UTF_8.name()
options.isDeprecation = true
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
test {
useJUnitPlatform()
}
jar {
enabled = false
}
}
tasks.withType<ShadowJar> {
archiveClassifier.set("")
relocate("com.google.gson", "${dependencyDir}.gson")
relocate("net.kyori.adventure.text.minimessage", "${dependencyDir}.adventure.text.minimessage")
}
tasks.withType<Checkstyle>().configureEach {
reports {
xml.required.set(true)
html.required.set(true)
}
}
tasks.withType<JacocoReport>().configureEach {
reports {
xml.required.set(true)
html.required.set(true)
}
}