forked from Minestom/Minestom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
99 lines (79 loc) · 2.72 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
plugins {
`java-library`
id("minestom.publishing-conventions")
id("minestom.native-conventions")
alias(libs.plugins.blossom)
}
allprojects {
group = "net.minestom.server"
version = "1.0"
description = "Lightweight and multi-threaded Minecraft server implementation"
}
sourceSets {
main {
java {
srcDir(file("src/autogenerated/java"))
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks {
withType<Javadoc> {
(options as? StandardJavadocDocletOptions)?.apply {
encoding = "UTF-8"
// Custom options
addBooleanOption("html5", true)
addStringOption("-release", "17")
// Links to external javadocs
links("https://docs.oracle.com/en/java/javase/17/docs/api/")
links("https://jd.adventure.kyori.net/api/${libs.versions.adventure.get()}/")
}
}
withType<Zip> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
blossom {
val git = "src/main/java/net/minestom/server/Git.java"
val gitCommit = System.getenv("GIT_COMMIT")
val gitBranch = System.getenv("GIT_BRANCH")
val group = System.getenv("GROUP")
val artifact = System.getenv("ARTIFACT")
replaceToken("\"&COMMIT\"", if (gitCommit == null) "null" else "\"${gitCommit}\"", git)
replaceToken("\"&BRANCH\"", if (gitBranch == null) "null" else "\"${gitBranch}\"", git)
replaceToken("\"&GROUP\"", if (group == null) "null" else "\"${group}\"", git)
replaceToken("\"&ARTIFACT\"", if (artifact == null) "null" else "\"${artifact}\"", git)
}
}
dependencies {
// Testing Framework
testImplementation(project(mapOf("path" to ":testing")))
// Only here to ensure J9 module support for extensions and our classloaders
testCompileOnly(libs.mockito.core)
// 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)
// Libraries
api(libs.gson)
implementation(libs.jcTools)
// Path finding
api(libs.hydrazine)
// Adventure, for user-interface
api(libs.bundles.adventure)
// Kotlin Libraries
api(libs.bundles.kotlin)
// Extension Management System dependency handler.
api(libs.dependencyGetter)
// Minestom Data (From MinestomDataGenerator)
implementation(libs.minestomData)
// NBT parsing/manipulation/saving
api("io.github.jglrxavpok.hephaistos:common:${libs.versions.hephaistos.get()}")
api("io.github.jglrxavpok.hephaistos:gson:${libs.versions.hephaistos.get()}")
}