-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
61 lines (50 loc) · 1.33 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.net.URI
import org.bukkit.buildtools.BuildToolsPlugin
import org.bukkit.buildtools.buildTools
plugins {
id("com.github.johnrengelman.shadow").version("7.0.0")
java
kotlin("jvm") version "1.5.21"
idea
}
apply<BuildToolsPlugin>()
buildTools {
minecraftVersion = "1.17.1"
}
group = "com.auroratide"
version = "1.0-SNAPSHOT"
val artifactName = "${project.name}-$version-all"
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events("skipped", "failed")
}
}
}
repositories {
mavenCentral()
maven {
url = URI("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
}
}
dependencies {
implementation(kotlin("stdlib"))
implementation(buildTools.spigotServer)
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.22")
}
tasks.named("shadowJar") {
dependsOn("check")
}
tasks.register<Copy>("stageJar") {
dependsOn("shadowJar")
from("build/libs/$artifactName.jar")
into("${buildTools.location}/plugins")
}
tasks.named("spigotRun") {
dependsOn("stageJar")
}