-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
74 lines (59 loc) · 1.8 KB
/
build.gradle.kts
File metadata and controls
74 lines (59 loc) · 1.8 KB
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
plugins {
kotlin("jvm") version "2.1.0-RC"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "dev.edwnl"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") {
name = "papermc-repo"
}
maven("https://oss.sonatype.org/content/groups/public/") {
name = "sonatype"
}
maven { url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/") }
}
dependencies {
// PaperMC api
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")
// Kotlin driver
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
// MongoDB Driver
implementation("org.mongodb:mongodb-driver-sync:4.11.1")
// Co-routines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-api:2.13.0")
implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-core:2.13.0")
// Scoreboard
implementation("fr.mrmicky:fastboard:2.1.3")
// PlaceholderAPI
compileOnly("me.clip:placeholderapi:2.11.6")
}
val targetJavaVersion = 21
kotlin {
jvmToolchain(targetJavaVersion)
}
tasks {
val serverPluginsDir = file("./development-server/plugins") // Update this path!
register<Copy>("copyToServer") {
from(shadowJar)
into(serverPluginsDir)
}
build {
dependsOn(shadowJar)
finalizedBy("copyToServer")
}
shadowJar {
// relocate("fr.mrmicky.fastboard", "dev.edwnl.macSMPCore")
archiveFileName.set("MAC-SMP-Core.jar")
}
}
tasks.processResources {
val props = mapOf("version" to version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("paper-plugin.yml") {
expand(props)
}
}