forked from Brettflan/WorldBorder
-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle.kts
68 lines (58 loc) · 1.58 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
plugins {
id("java-library")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "com.wimbli.WorldBorder"
version = "1.19"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withSourcesJar()
}
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.mikeprimm.com/")
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.14-R0.1-SNAPSHOT")
compileOnly(group = "us.dynmap", name = "dynmap-api", version = "3.1")
implementation(group = "io.papermc", name = "paperlib", version = "1.0.8-SNAPSHOT")
}
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()
relocate("io.papermc.lib", "${project.group}.paperlib")
archiveFileName.set("${project.name}.jar")
}
build {
dependsOn(shadowJar)
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = project.name
version = "${project.version}"
from(components["java"])
}
}
}