-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (69 loc) · 2.28 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
69
70
71
72
73
74
75
76
77
78
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("idea")
kotlin("jvm") version "1.8.0"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
group = "kr.abins.corpse"
repositories {
mavenCentral()
maven {
url = uri("https://repo.dmulloy2.net/repository/public/")
}
maven {
name = "sk89q-repo"
url = uri("https://maven.enginehub.org/repo/")
}
maven {
name = "papermc-repo"
url = uri("https://papermc.io/repo/repository/maven-public/")
}
maven {
name = "everything"
url = uri("https://repo.citizensnpcs.co/")
}
maven("https://oss.sonatype.org/content/repositories/central")
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("org.spigotmc:spigot:1.19.3-R0.1-SNAPSHOT") {
exclude("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
}
compileOnly(group = "com.comphenix.protocol", name = "ProtocolLib", version = "5.0.0-SNAPSHOT")
compileOnly(group = "com.sk89q.worldguard", name = "worldguard-bukkit", version = "7.0.6-SNAPSHOT")
compileOnly(group = "net.citizensnpcs", name = "citizens-main", version = "2.0.30-SNAPSHOT") {
exclude("*", "*")
}
}
fun TaskContainer.createJar(name: String, configuration: ShadowJar.() -> Unit) {
create<ShadowJar>(name) {
archiveBaseName.set(project.name)
archiveVersion.set("") // For bukkit plugin update
from(sourceSets["main"].output)
configurations = listOf(project.configurations.shadow.get().apply { isCanBeResolved = true })
configuration()
}
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
processResources {
filesMatching("**/*.yml") {
expand(project.properties)
}
}
createJar("outJar") {
var dest = File("C:/Users/a0103/바탕 화면/모음지이이입/버킷 모음지이입/TheOutpost/plugins")
val pluginName = archiveFileName.get()
val pluginFile = File(dest, pluginName)
if (pluginFile.exists()) dest = File(dest, "update")
doLast {
copy {
from(archiveFile)
into(dest)
}
}
}
}