-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
60 lines (49 loc) · 1.5 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "net.shotbow"
version = "1.19"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.13-R0.1-SNAPSHOT")
implementation(group = "net.kyori", name = "adventure-platform-bukkit", version = "4.1.1")
implementation(group = "net.kyori", name = "adventure-text-minimessage", version = "4.11.0")
}
defaultTasks("clean", "build")
tasks {
processResources {
val placeholders = mapOf(
"name" to project.name,
"group" to project.group,
"version" to project.version
)
filesMatching("plugin.yml") {
expand(placeholders)
}
}
jar {
archiveFileName.set("${project.name}-noshade.jar")
}
shadowJar {
minimize()
archiveFileName.set("${project.name}.jar")
}
register<ConfigureShadowRelocation>("configureShadowRelocation") {
target = shadowJar.get()
prefix = "${project.group}.${project.name.toLowerCase()}.libraries"
}
build {
dependsOn(shadowJar).dependsOn("configureShadowRelocation")
}
}