This repository has been archived by the owner on Oct 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
113 lines (94 loc) · 2.89 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm") version "1.6.20"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("io.papermc.paperweight.userdev") version "1.3.5"
id("xyz.jpenilla.run-paper") version "1.0.6"
id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
}
repositories {
mavenLocal()
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.inventivetalent.org/repository/maven-snapshots/")
maven("https://jitpack.io/")
}
val shadowMe by configurations.creating {
configurations.implementation.get().extendsFrom(this)
}
dependencies {
paperDevBundle("1.18.2-R0.1-SNAPSHOT")
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
shadowMe("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
shadowMe("org.jetbrains.kotlin:kotlin-reflect")
shadowMe("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("org.inventivetalent:glowapi:1.5.3-SNAPSHOT")
implementation("org.inventivetalent.packetlistenerapi:api") {
version {
strictly("3.9.10-SNAPSHOT")
}
}
}
group = "me.yoursole"
version = "1.0-SNAPSHOT"
description = "CapturetheFlag"
bukkit {
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
main = "me.yoursole.ctf.CTF"
apiVersion = "1.18"
authors = listOf("Yoursole", "My-Name-Is-Jeff")
depend = listOf("GlowAPI")
}
tasks {
processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
filteringCharset = "UTF-8"
}
javadoc {
options.encoding = "UTF-8"
}
assemble {
dependsOn(reobfJar)
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs =
listOf("-opt-in=kotlin.RequiresOptIn", "-Xjvm-default=all", "-Xrelease=8", "-Xbackend-threads=0")
}
kotlinDaemonJvmArguments.set(
listOf(
"-Xmx2G",
)
)
}
named<Jar>("jar") {
enabled = false
dependsOn(shadowJar)
}
withType<ShadowJar> {
configurations = listOf(shadowMe)
archiveFileName.set(jar.get().archiveFileName)
}
register<Copy>("copyPlugin") {
from("$buildDir/libs/")
include("*.jar")
into("$projectDir/server/plugins/")
dependsOn(shadowJar.get())
}
build.get().dependsOn(named("copyPlugin"))
}
kotlin {
jvmToolchain {
check(this is JavaToolchainSpec)
languageVersion.set(JavaLanguageVersion.of(17))
}
}