-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
125 lines (101 loc) · 2.62 KB
/
build.gradle.kts
File metadata and controls
125 lines (101 loc) · 2.62 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
plugins {
java
jacoco
alias(libs.plugins.shadow)
alias(libs.plugins.publishdata)
alias(libs.plugins.runPaper)
alias(libs.plugins.pluginYml)
`maven-publish`
}
group = "net.onelitefeather"
version = "1.0.0"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
dependencies {
// Paper
compileOnly(libs.paper)
//Adventure (Bukkit)
implementation(libs.adventureBukkit)
//Cloud command framework
implementation(libs.cloudPaper)
implementation(libs.cloudAnnotations)
implementation(libs.cloudExtras)
implementation(libs.commodore)
//Caching
implementation(libs.caffeine)
// Database
implementation(libs.bundles.hibernate)
implementation(libs.jaxbRuntime)
implementation(libs.postgresql)
// Testing
testImplementation(libs.junitJupiterApi)
testRuntimeOnly(libs.junitJupiterEngine)
}
tasks {
compileJava {
options.encoding = "UTF-8"
options.release.set(21)
}
runServer {
minecraftVersion("1.21.1")
jvmArgs("-Xmx4G", "-Dcom.mojang.eula.agree=true")
}
test {
useJUnitPlatform()
}
shadowJar {
archiveFileName.set("${rootProject.name}.${archiveExtension.getOrElse("jar")}")
}
jacocoTestReport {
dependsOn(rootProject.tasks.test)
reports {
xml.required.set(true)
}
}
}
publishData {
addBuildData()
val projectId: String by project
val gitlabUrl: String by project
useGitlabReposForProject(projectId, gitlabUrl)
publishTask("shadowJar")
}
publishing {
publications.create<MavenPublication>("maven") {
// configure the publication as defined previously.
publishData.configurePublication(this)
version = publishData.getVersion(false)
}
repositories {
maven {
credentials(HttpHeaderCredentials::class) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create("header", HttpHeaderAuthentication::class)
}
name = "Gitlab"
// Get the detected repository from the publishing data
url = uri(publishData.getRepository())
}
}
}
paper {
main = "${rootProject.group}.playerkits.PlayerKitsPlugin"
apiVersion = "1.20"
author = "theShadowsDust"
authors = listOf("OneLiteFeather")
//Paper
hasOpenClassloader = false
generateLibrariesJson = false
foliaSupported = true
serverDependencies {
register("Vault") {
required = false
}
}
}