forked from Codisimus/PhatLoots
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle.kts
90 lines (74 loc) · 2.45 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
plugins {
id("java")
id("java-library")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("xyz.jpenilla.run-paper") version "2.3.0"
id("com.modrinth.minotaur") version "2.+"
}
val supportedVersions = listOf("1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", "1.21")
group = "com.codisimus.plugins"
version = "5.6.7"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/groups/public")
maven("https://repo.citizensnpcs.co")
maven("https://maven.enginehub.org/repo/")
maven("https://dl.auranode.com/repo/")
maven("https://repo.codemc.io/repository/maven-public")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://mvn.lumine.io/repository/maven-public/")
maven("https://repo.battleplugins.org/releases/")
maven("https://repo.battleplugins.org/snapshots/")
}
dependencies {
compileOnly(libs.paper.api)
// Plugin dependencies
compileOnly(libs.citizens.api)
compileOnly(libs.worldguard.core)
compileOnly(libs.worldedit.bukkit)
compileOnly(libs.vault.api)
compileOnly(libs.nuvotifier)
compileOnly(libs.mythicdrops)
compileOnly(libs.placeholder.api)
compileOnly(libs.mythicmobs)
compileOnly(libs.battlearena)
// Shaded libs
implementation(libs.bstats.bukkit)
}
tasks {
runServer {
minecraftVersion("1.20")
}
shadowJar {
from("src/main/java/resources") {
include("*")
}
// Relocate metrics
relocate("org.bstats", "com.codisimus.plugins.phatloots.shaded.bstats")
archiveFileName.set("PhatLoots.jar")
archiveClassifier.set("")
}
jar {
archiveClassifier.set("unshaded")
}
processResources {
expand("version" to rootProject.version)
}
named("build") {
dependsOn(shadowJar)
}
}
modrinth {
val snapshot = "SNAPSHOT" in rootProject.version.toString()
token.set(System.getenv("MODRINTH_TOKEN") ?: "")
projectId.set("phatloots")
versionNumber.set(rootProject.version as String + if (snapshot) "-" + System.getenv("BUILD_NUMBER") else "")
versionType.set(if (snapshot) "beta" else "release")
changelog.set(System.getenv("CHANGELOG") ?: "")
uploadFile.set(tasks.shadowJar)
gameVersions.set(supportedVersions)
}