This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
127 lines (89 loc) · 3.53 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
126
127
plugins {
id("io.papermc.paperweight.userdev") version "1.5.9"
id("xyz.jpenilla.run-paper") version "2.2.3"
`java-library`
}
base {
archivesName.set(rootProject.name)
}
repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.glaremasters.me/repository/bloodshot")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven("https://jitpack.io")
exclusiveContent {
forRepository {
maven("https://api.modrinth.com/maven/")
}
filter { includeGroup("maven.modrinth") }
}
}
rootProject.version = if (System.getenv("BUILD_NUMBER") != null) "${rootProject.version}-${System.getenv("BUILD_NUMBER")}" else rootProject.version
val mcVersion = providers.gradleProperty("minecraftVersion").get()
dependencies {
paperweight.paperDevBundle("$mcVersion-R0.1-SNAPSHOT")
compileOnly("com.github.cjburkey01", "ClaimChunk", "0.0.22")
compileOnly("com.griefdefender", "api", "2.1.0-SNAPSHOT")
compileOnly("com.github.TechFortress", "GriefPrevention", "16.18")
compileOnly("com.sk89q.worldguard", "worldguard-bukkit", "7.0.8-SNAPSHOT")
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.28"))
compileOnly("com.plotsquared:PlotSquared-Core")
compileOnly("com.plotsquared:PlotSquared-Bukkit")
compileOnly("maven.modrinth", "pl3xmap", providers.gradleProperty("pl3xmapVersion").get())
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of("17"))
}
tasks {
javadoc {
options.encoding = "UTF-8"
}
compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
runServer {
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
defaultCharacterEncoding = Charsets.UTF_8.name()
minecraftVersion(mcVersion)
downloadPlugins {
hangar("Chunky", "1.3.136")
modrinth("pl3xmap", providers.gradleProperty("pl3xmapVersion").get())
modrinth("griefprevention", "16.18.2")
github("cjburkey01", "ClaimChunk", "0.0.23-RC8", "claimchunk-0.0.23-RC8-plugin.jar")
url("https://ci.lucko.me/job/spark/401/artifact/spark-bukkit/build/libs/spark-1.10.60-bukkit.jar")
url("https://download.luckperms.net/1532/bukkit/loader/LuckPerms-Bukkit-5.4.119.jar")
url("https://ci.enginehub.org/repository/download/bt11/22585:id/worldguard-bukkit-7.0.10-SNAPSHOT-dist.jar?branch=version/7.0.x&guest=1")
url("https://ci.enginehub.org/repository/download/bt10/23464:id/worldedit-bukkit-7.2.20-dist.jar?branch=version/7.2.x&guest=1")
}
}
val jarsDir = File("$rootDir/jars")
assemble {
doFirst {
delete(jarsDir)
jarsDir.mkdirs()
}
dependsOn(reobfJar)
doLast {
copy {
from(rootProject.layout.buildDirectory.files("libs/${rootProject.name}-${rootProject.version}.jar"))
into(jarsDir)
}
}
}
processResources {
val props = mapOf(
"name" to rootProject.name,
"group" to rootProject.group,
"version" to rootProject.version,
"description" to rootProject.description,
"authors" to rootProject.properties["authors"],
"website" to rootProject.properties["website"],
"apiVersion" to rootProject.properties["apiVersion"],
)
filesMatching("plugin.yml") {
expand(props)
}
}
}