This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
83 lines (71 loc) · 2.68 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
import io.papermc.hangarpublishplugin.model.Platforms
plugins {
id("java")
id("io.papermc.hangar-publish-plugin") version "0.1.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("net.minecrell.plugin-yml.paper") version "0.6.0"
}
group = "net.thenextlvl.msg"
version = "1.0.3"
java {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
repositories {
mavenCentral()
maven("https://repo.thenextlvl.net/releases")
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("org.projectlombok:lombok:1.18.30")
compileOnly("net.thenextlvl.core:annotations:2.0.1")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
implementation("net.thenextlvl.core:files:1.0.3")
implementation("net.thenextlvl.core:i18n:1.0.13")
implementation("org.bstats:bstats-bukkit:3.0.2")
implementation("org.bstats:bstats-velocity:3.0.2")
annotationProcessor("org.projectlombok:lombok:1.18.30")
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
}
tasks.shadowJar {
minimize()
relocate("org.bstats", "net.thenextlvl.msg.bstats")
}
paper {
name = "VanillaMSG"
main = "net.thenextlvl.msg.paper.MessagePlugin"
description = "A simple msg plugin"
apiVersion = "1.19"
foliaSupported = true
website = "https://thenextlvl.net"
authors = listOf("NonSwag")
}
val versionString: String = project.version as String
val isRelease: Boolean = !versionString.contains("-pre")
hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
publications.register("plugin") {
id.set("VanillaMSG")
version.set(project.version as String)
channel.set(if (isRelease) "Release" else "Snapshot")
if (extra.has("HANGAR_API_TOKEN"))
apiKey.set(extra["HANGAR_API_TOKEN"] as String)
else apiKey.set(System.getenv("HANGAR_API_TOKEN"))
platforms {
register(Platforms.PAPER) {
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
val versions: List<String> = (property("paperVersion") as String)
.split(",")
.map { it.trim() }
platformVersions.set(versions)
}
register(Platforms.VELOCITY) {
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
val versions: List<String> = (property("velocityVersion") as String)
.split(",")
.map { it.trim() }
platformVersions.set(versions)
}
}
}
}