-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
59 lines (51 loc) · 1.45 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.10"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
group = "top.e404"
version = "1.0.1"
repositories {
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven(url = "https://oss.sonatype.org/content/groups/public/")
maven(url = "https://repo.dmulloy2.net/repository/public/")
maven(url = "https://jitpack.io")
mavenCentral()
mavenLocal()
}
dependencies {
// spigot
compileOnly("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT")
// sf
compileOnly("com.github.Slimefun:Slimefun4:RC-30")
// Bstats
implementation("org.bstats:bstats-bukkit:3.0.0")
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8"
}
tasks.shadowJar {
archiveFileName.set("${project.name}.jar")
relocate("org.bstats", "top.e404.dancetree.bstats")
exclude("META-INF/*")
doFirst {
for (file in File("jar").listFiles() ?: arrayOf()) {
println("正在删除`${file.name}`")
file.delete()
}
}
doLast {
File("jar").mkdirs()
for (file in File("build/libs").listFiles() ?: arrayOf()) {
println("正在复制`${file.name}`")
file.copyTo(File("jar/${file.name}"), true)
}
}
}
tasks {
processResources {
filesMatching("plugin.yml") {
expand(project.properties)
}
}
}