-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
68 lines (56 loc) · 1.75 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.JavaVersion.VERSION_21
import xyz.jpenilla.runpaper.task.RunServer
plugins {
java
alias(libs.plugins.shadow)
alias(libs.plugins.paperweight.userdev)
alias(libs.plugins.run.paper)
}
group = "de.ole101.chained"
version = "1.0-SNAPSHOT"
description = "A Minecraft plugin that tries to recreate the game Chained Together"
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://jitpack.io")
}
dependencies {
implementation(rootProject.libs.lombok)
annotationProcessor(rootProject.libs.lombok)
implementation(rootProject.libs.guice)
implementation(rootProject.libs.annotations)
implementation(rootProject.libs.classindex)
annotationProcessor(rootProject.libs.classindex)
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
}
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = VERSION_21.toString()
targetCompatibility = VERSION_21.toString()
options.encoding = "UTF-8"
}
tasks {
test {
useJUnitPlatform()
}
named<Jar>("jar") {
archiveFileName.set("${project.name}-${project.version}.jar")
}
named<ShadowJar>("shadowJar") {
archiveFileName.set("${project.name}-${project.version}-all.jar")
}
named<ProcessResources>("processResources") {
from(sourceSets.main.get().resources.srcDirs) {
filesMatching("paper-plugin.yml") {
expand("version" to project.version)
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
named<RunServer>("runServer") {
minecraftVersion("1.21.1")
}
build {
dependsOn(named("shadowJar"))
}
}