This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
91 lines (74 loc) · 2.42 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
import io.gitlab.arturbosch.detekt.Detekt
import kotlinx.kover.api.KoverTaskExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt") version "1.20.0"
id("org.jetbrains.kotlinx.kover") version "0.5.1"
id("land.vani.maven.publish")
}
group = "land.vani.mockpaper"
version = "0.1.0"
repositories {
mavenCentral()
maven {
name = "PaperMC"
url = uri("https://papermc.io/repo/repository/maven-public/")
content {
includeGroup("io.papermc.paper")
}
}
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.20.0")
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("test-junit5"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1")
implementation("org.opentest4j:opentest4j:1.2.0")
implementation("io.papermc.paper:paper-api:1.18.1-R0.1-20220104.205543-66")
implementation("net.kyori:adventure-text-serializer-bungeecord:4.1.0")
testImplementation("io.kotest:kotest-runner-junit5:5.3.0")
testImplementation("io.kotest:kotest-assertions-core:5.3.0")
testImplementation("io.kotest:kotest-property:5.3.0")
// Missing dependencies for LibraryLoader
implementation("org.apache.maven:maven-aether-provider:3.3.9")
implementation("org.eclipse.aether:aether-impl:1.1.0")
implementation("org.eclipse.aether:aether-transport-http:1.1.0")
implementation("org.eclipse.aether:aether-connector-basic:1.1.0")
}
val targetJavaVersion = 17
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "$targetJavaVersion"
}
}
assemble {
dependsOn("javadocJar", "sourcesJar")
}
withType<Test> {
useJUnitPlatform()
extensions.configure<KoverTaskExtension> {
isDisabled = false
includes = listOf("land.vani.mockpaper.*")
}
}
withType<Detekt> {
reports {
xml.required.set(true)
}
jvmTarget = "16"
}
koverXmlReport {
isEnabled = true
}
}