-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
build.gradle.kts
70 lines (62 loc) · 2.21 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
plugins {
id("java-library")
alias(libs.plugins.minotaur)
}
val buildNum = System.getenv("NEXT_BUILD_NUMBER") ?: "SNAPSHOT"
project.version = "${libs.versions.minecraft.get()}-$buildNum"
tasks {
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
subprojects {
dependsOn(project.tasks.build)
}
archiveClassifier = ""
// this is janky, but it works
val manifestFiles = subprojects.filter({ it.name != "webmap" && it.name != "core" }).map {
val regularFile = it.layout.buildDirectory.file("libs/${project.name}-${it.name}-${it.version}.jar")
if (regularFile.isPresent) {
zipTree(regularFile)
} else {
null
}
}.filterNotNull()
from(manifestFiles) {
exclude("META-INF/MANIFEST.MF")
}
// this is janky, but it works
doFirst {
manifestFiles.forEach {
it.matching { include("META-INF/MANIFEST.MF") }.files.forEach {
manifest.from(it)
}
}
}
}
}
modrinth {
autoAddDependsOn = false
token = System.getenv("MODRINTH_TOKEN")
projectId = "pl3xmap"
versionName = "${project.version}"
versionNumber = "${project.version}"
versionType = "beta"
uploadFile = rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}.jar").get()
//additionalFiles.addAll([
// rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}-javadoc.jar").get(),
// rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}-sources.jar").get()
//])
gameVersions.addAll(listOf(libs.versions.minecraft.get()))
loaders.addAll(listOf("bukkit", "fabric", /*"forge",*/ "paper", "purpur", "quilt", "spigot", "folia"))
changelog = System.getenv("COMMIT_MESSAGE")
dependencies {
required.project("fabric-api")
//optional.project(
// "pl3xmap-banners",
// "pl3xmap-claims",
// "pl3xmap-mobs",
// "pl3xmap-signs",
// "pl3xmap-warps",
// "deathspots",
//)
}
}