-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
60 lines (48 loc) · 1.63 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
60 lines (48 loc) · 1.63 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
plugins {
kotlin("jvm") version "2.4.10"
id("com.gradleup.shadow") version "9.6.1"
id("net.blueva.mawu") version "26.3"
}
group = "net.blueva.mawu.example"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.blueva.net/releases")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:26.2.build.121-stable")
// Downloaded on first boot by ExampleRuntimeDependencies, so they are
// compiled against and never packaged.
compileOnly(kotlin("stdlib"))
compileOnly("net.blueva:mawu-runtime:26.3")
// The one library that cannot download itself: only its
// net.blueva.foundation.dependencies package is kept in the jar.
implementation("net.blueva.foundation:BlueFoundation:26.32")
}
mawu {
// The runtime arrives at boot, not through Gradle.
addRuntimeDependency.set(false)
// Globals the plugin installs before it runs a script.
knownGlobals.addAll("server", "plugin", "commands", "events")
}
kotlin {
jvmToolchain(25)
}
tasks.shadowJar {
archiveClassifier.set("")
// The loader has to be on the classpath before it can fetch anything, so
// its package stays. The predicate has no trailing slash on purpose:
// excluding the directory entry would exclude everything under it.
exclude { element ->
val path = element.path
path.startsWith("net/blueva/foundation/") && !path.startsWith("net/blueva/foundation/dependencies")
}
}
tasks.build {
dependsOn(tasks.shadowJar)
}
tasks.processResources {
filesMatching("plugin.yml") {
expand("version" to project.version)
}
}