forked from Minestom/Minestom
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
125 lines (110 loc) · 3.41 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import java.util.*
plugins {
`java-library`
id("minestom.publishing-conventions")
id("minestom.native-conventions")
alias(libs.plugins.blossom)
signing
jacoco
id("org.sonarqube") version "4.4.1.3373"
}
group = "net.onelitefeather.microtus"
version = System.getenv("TAG_VERSION") ?: "1.6.0-SNAPSHOT"
allprojects {
group = "net.onelitefeather.microtus"
version = rootProject.version
description = "Lightweight and multi-threaded Minecraft server implementation"
}
sourceSets {
main {
java {
srcDir(file("src/autogenerated/java"))
}
blossom {
javaSources {
val gitCommit = System.getenv("GIT_COMMIT")
val gitBranch = System.getenv("GIT_BRANCH")
val group = System.getenv("GROUP")
val artifact = System.getenv("ARTIFACT")
property("\"&COMMIT\"", if (gitCommit == null) "null" else "\"${gitCommit}\"")
property("\"&BRANCH\"", if (gitBranch == null) "null" else "\"${gitBranch}\"")
property("\"&GROUP\"", if (group == null) "null" else "\"${group}\"")
property("\"&ARTIFACT\"", if (artifact == null) "null" else "\"${artifact}\"")
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks {
jar {
manifest {
attributes("Automatic-Module-Name" to "net.minestom.server")
}
}
withType<Javadoc> {
(options as? StandardJavadocDocletOptions)?.apply {
encoding = "UTF-8"
// Custom options
addBooleanOption("html5", true)
addStringOption("-release", "21")
// Links to external javadocs
links("https://docs.oracle.com/en/java/javase/21/docs/api/")
links("https://jd.adventure.kyori.net/api/${libs.versions.adventure.get()}/")
}
}
withType<Zip> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
withType<Test> {
useJUnitPlatform()
// Viewable packets make tracking harder. Could be re-enabled later.
jvmArgs("-Dminestom.viewable-packet=false")
jvmArgs("-Dminestom.inside-test=true")
minHeapSize = "512m"
maxHeapSize = "1024m"
}
jacocoTestReport {
reports {
xml.required = true
}
}
}
dependencies {
// Core dependencies
api(libs.slf4j)
api(libs.jetbrainsAnnotations)
api(libs.bundles.adventure)
implementation(libs.minestomData)
// Logging
implementation(libs.bundles.logging)
// Libraries required for the terminal
implementation(libs.bundles.terminal)
// Performance improving libraries
implementation(libs.caffeine)
api(libs.fastutil)
implementation(libs.bundles.flare)
// BStats
api(libs.bstats.base)
// Maven
api(libs.maven.resolver)
api(libs.maven.connector)
api(libs.maven.transport.http)
// Libraries
api(libs.gson)
implementation(libs.jcTools)
// Testing
testImplementation(libs.bundles.junit)
testImplementation(project(":testing"))
// Only here to ensure J9 module support for extensions and our classloaders
testCompileOnly(libs.mockito.core)
}
sonar {
properties {
property("sonar.projectKey", "OneLiteFeatherNET_Microtus")
property("sonar.organization", "onelitefeathernet")
property("sonar.host.url", "https://sonarcloud.io")
}
}