This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
105 lines (91 loc) · 3.3 KB
/
build.gradle.kts
File metadata and controls
105 lines (91 loc) · 3.3 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
id("java")
id("maven-publish")
id("com.gradleup.shadow") version "8.3.6"
id("io.freefair.lombok") version "8.12.1"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
}
group = "net.guizhanss"
version = "UNOFFICIAL"
description = "SlimefunTranslation"
val mainPackage = "net.guizhanss.slimefuntranslation"
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://jitpack.io")
maven("https://repo.dmulloy2.net/repository/public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.github.Slimefun:Slimefun4:RC-37")
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("com.comphenix.protocol:ProtocolLib:5.3.0")
implementation("net.guizhanss:guizhanlib-all:2.2.0")
implementation("org.bstats:bstats-bukkit:3.1.0")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
}
tasks.compileJava {
options.encoding = "UTF-8"
}
tasks.javadoc {
options.encoding = "UTF-8"
}
tasks.shadowJar {
fun doRelocate(from: String) {
val last = from.split(".").last()
relocate(from, "$mainPackage.libs.$last")
}
doRelocate("net.guizhanss.guizhanlib")
doRelocate("org.bstats")
minimize()
archiveClassifier = ""
}
bukkit {
main = "net.guizhanss.slimefuntranslation.SlimefunTranslation"
apiVersion = "1.16"
authors = listOf("ybw0014")
description = "A Slimefun Addon that translates items without actually modifying the items."
depend = listOf("Slimefun", "ProtocolLib", "PlaceholderAPI")
softDepend = listOf("GuizhanLibPlugin")
commands {
register("sftranslation") {
description = "SlimefunTranslation command"
aliases = listOf("slimefuntranslation", "sft", "sftr", "sftransl")
}
}
permissions {
register("sftranslation.command.id") {
description = "Get the ID of the Slimefun item in your main hand"
default = BukkitPluginDescription.Permission.Default.TRUE
}
register("sftranslation.command.search") {
description = "Search for a Slimefun item with your current language"
default = BukkitPluginDescription.Permission.Default.TRUE
}
register("sftranslation.command.translation.extract") {
description = "Extract the translation files to the \"translations\" folder"
default = BukkitPluginDescription.Permission.Default.OP
}
register("sftranslation.command.translation.generate") {
description = "Generate a translation file based on the given addon and language."
default = BukkitPluginDescription.Permission.Default.OP
}
register("sftranslation.command.translation.reload") {
description = "Reload the translation files."
default = BukkitPluginDescription.Permission.Default.OP
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}