-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
85 lines (66 loc) · 2.54 KB
/
build.gradle.kts
File metadata and controls
85 lines (66 loc) · 2.54 KB
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
@file:Suppress("SpellCheckingInspection")
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
kotlin("jvm") version "2.1.10"
kotlin("plugin.serialization") version "2.1.10"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("io.github.goooler.shadow") version "8.1.7"
}
repositories {
mavenCentral()
maven("https://repo.purpurmc.org/snapshots")
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
// DiscordSRV
maven { url = uri("https://m2.dv8tion.net/releases") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") }
maven { url = uri("https://nexus.scarsz.me/content/groups/public/") }
// PlaceholderAPI
maven { url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/") }
// bStats
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
mavenLocal()
}
dependencies {
compileOnly(kotlin("stdlib"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
implementation("com.charleskorn.kaml:kaml:0.72.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.8.0")
// Paper
compileOnly("org.purpurmc.purpur", "purpur-api", "1.21.4-R0.1-SNAPSHOT")
// DiscordSRV
compileOnly("com.discordsrv", "discordsrv", "1.28.0")
// PlaceholderAPI
compileOnly("me.clip", "placeholderapi", "2.11.2")
// bStats
implementation("org.bstats", "bstats-bukkit", "1.8")
}
bukkit {
main = "me.weiwen.discussion.Discussion"
name = "Discussion"
version = project.version.toString()
description = "Simple chat formatting and channels plugin"
apiVersion = "1.18"
author = "Goh Wei Wen <goweiwen@gmail.com>"
website = "weiwen.me"
softDepend = listOf("DiscordSRV", "PlaceholderAPI")
}
tasks.withType<ShadowJar> {
fun reloc(pkg: String) = relocate(pkg, "$group.dependency.$pkg")
reloc("org.bstats")
reloc("cloud.commandframework")
}
val pluginPath = project.findProperty("plugin_path")
if(pluginPath != null) {
tasks {
named<DefaultTask>("build") {
dependsOn("shadowJar")
doLast {
copy {
from(findByName("reobfJar") ?: findByName("shadowJar") ?: findByName("jar"))
into(pluginPath)
}
}
}
}
}