-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
77 lines (66 loc) · 1.75 KB
/
build.gradle.kts
File metadata and controls
77 lines (66 loc) · 1.75 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
plugins {
`maven-publish`
alias(libs.plugins.shadow)
alias(libs.plugins.publishdata)
java
id("xyz.jpenilla.run-paper") version "3.0.2"
id("net.minecrell.plugin-yml.paper") version "0.6.0"
}
group = "net.onelitefeather"
version = "1.0.0"
dependencies {
compileOnly(libs.paper)
implementation(libs.cloud.core)
implementation(libs.cloud.paper)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks {
compileJava {
options.release.set(21)
options.encoding = "UTF-8"
}
runServer {
minecraftVersion("1.21.1")
}
shadowJar {
mergeServiceFiles()
}
}
paper {
main = "net.onelitefeather.gameruletemplate.GameRuleTemplate"
apiVersion = "1.21"
authors = listOf("TheMeinerLP", "OneLiteFeatherNET")
description = "A plugin that allows to copy and paste gamerules"
}
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())
}
}
}