-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
39 lines (33 loc) · 845 Bytes
/
build.gradle.kts
File metadata and controls
39 lines (33 loc) · 845 Bytes
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
plugins {
kotlin("jvm") version "2.2.20-Beta2"
id("com.gradleup.shadow") version "9.4.1"
}
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
mavenCentral()
}
dependencies {
implementation(project(":paper"))
implementation(project(":bukkit"))
implementation(project(":common"))
}
kotlin {
jvmToolchain(21)
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.register<Jar>("package") {
dependsOn("clean")
val outputDir = rootDir.resolve("outputs")
outputDir.mkdirs()
subprojects.forEach { subproject ->
subproject.tasks.findByName("shadowJar")?.let { shadowJarTask ->
dependsOn(shadowJarTask)
doLast {
val file = (shadowJarTask as AbstractArchiveTask).archiveFile.get().asFile
file.copyTo(outputDir.resolve(file.name), true)
}
}
}
}