forked from alkarinv/ArenaSpleef
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
72 lines (58 loc) · 1.81 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
plugins {
id("java")
id("java-library")
id("xyz.jpenilla.run-paper") version "2.3.0"
id("com.modrinth.minotaur") version "2.+"
}
group = "org.battleplugins.arena"
version = "2.0.1-SNAPSHOT"
val supportedVersions = listOf(
"1.19.4",
"1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6",
"1.21", "1.21.1", "1.21.2", "1.21.3", "1.21.4"
)
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.battleplugins.org/releases/")
maven("https://repo.battleplugins.org/snapshots/")
}
dependencies {
api("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
api("org.battleplugins:arena:4.0.0-SNAPSHOT")
}
tasks {
runServer {
minecraftVersion("1.20.6")
// Set Java 21 (1.20.6 requires Java 21)
javaLauncher = project.javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
}
}
jar {
from("src/main/java/resources") {
include("*")
}
archiveFileName.set("ArenaSpleef.jar")
archiveClassifier.set("")
}
processResources {
filesMatching("plugin.yml") {
expand("version" to rootProject.version)
}
}
}
modrinth {
val snapshot = "SNAPSHOT" in rootProject.version.toString()
token.set(System.getenv("MODRINTH_TOKEN") ?: "")
projectId.set("arenaspleef")
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.jar)
gameVersions.set(supportedVersions)
dependencies {
required.project("battlearena")
}
}