-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
77 lines (66 loc) · 2.09 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
plugins {
kotlin("jvm") version "1.8.21"
id("com.github.johnrengelman.shadow") version ("7.1.1")
kotlin("plugin.serialization") version "1.8.21"
}
group = "cc.dashify.plugin"
version = "1.0.1"
val ktorVersion = "2.3.1"
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
mavenCentral()
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
compileOnly(kotlin("stdlib-jdk8:1.8.21"))
compileOnly("org.mindrot:jbcrypt:0.4")
compileOnly("io.sentry:sentry:6.25.2")
compileOnly("cloud.commandframework:cloud-paper:1.8.3")
implementation("io.ktor:ktor-server-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-cors-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson-jvm:$ktorVersion")
}
kotlin {
jvmToolchain(17)
}
tasks {
create<Jar>("sourcesJar") {
from(sourceSets["main"].allSource)
archiveClassifier.set("sources")
}
processResources {
filesMatching("**/*.yml") {
expand(project.properties)
}
}
shadowJar {
archiveBaseName.set("dashify-plugin")
from(sourceSets["main"].output)
val plugins = File(rootDir, ".server/plugins/")
doLast {
copy {
from(archiveFile)
if (File(plugins, archiveFileName.get()).exists()) {
File(plugins, archiveFileName.get()).delete()
}
into(plugins)
}
}
}
register<Jar>("buildJar") {
archiveBaseName.set("dashify-plugin")
from(sourceSets["main"].output)
val plugins = File(rootDir, ".server/plugins/")
doLast {
copy {
from(archiveFile)
if (File(plugins, archiveFileName.get()).exists()) {
File(plugins, archiveFileName.get()).delete()
}
into(plugins)
}
}
}
}