-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (62 loc) · 2.13 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
import java.text.SimpleDateFormat
plugins {
`java-library`
`maven-publish`
id("com.github.johnrengelman.shadow").version("7.1.2")
kotlin("jvm") version "1.9.20"
}
group = "pers.yufiria"
version = "1.4.1"
repositories {
mavenLocal()
maven("https://repo.codemc.io/repository/nms/")
maven("https://repo.maven.apache.org/maven2/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://oss.sonatype.org/content/repositories/central")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.purpurmc.org/snapshots")
maven("https://mvn.lumine.io/repository/maven-public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.crypticlib.com:8081/repository/maven-public/")
mavenCentral()
}
dependencies {
compileOnly("org.spigotmc:spigot:1.19-R0.1-SNAPSHOT")
compileOnly("net.luckperms:api:5.4")
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("io.lumine:Mythic-Dist:5.3.5")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
implementation("com.crypticlib:bukkit:1.10.7")
implementation(kotlin("stdlib-jdk8"))
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks {
val props = HashMap<String, String>()
val pluginVersion: String = version.toString() + "-" + SimpleDateFormat("yyyyMMdd").format(System.currentTimeMillis())
props["version"] = pluginVersion
processResources {
filesMatching("plugin.yml") {
expand(props)
}
}
compileJava {
options.encoding = "UTF-8"
}
build {
dependsOn(shadowJar)
}
shadowJar {
archiveFileName.set("DeathMessage-$version.jar")
relocate("crypticlib", "pers.yufiria.deathmsg.crypticlib")
relocate("kotlin", "kotlin1920")
relocate("org.intellij.lang.annotations", "pers.yufiria.deathmsg.libs.intellij.lang.annotations")
relocate("org.jetbrains.annotations", "pers.yufiria.deathmsg.libs.jetbrains.annotations")
}
}
kotlin {
jvmToolchain(17)
}