-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
80 lines (68 loc) · 2.07 KB
/
build.gradle.kts
File metadata and controls
80 lines (68 loc) · 2.07 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.PluginLoadOrder
plugins {
id("briarcode.kotlin-plugin")
alias(libs.plugins.shadow)
// alias(libs.plugins.paper.userdev)
id("io.papermc.paperweight.userdev")
}
version = "2.0.1-${libs.versions.kotlin.get()}-SNAPSHOT"
description = ""
dependencies {
paperweight.paperDevBundle(libs.versions.paper.get())
implementation(libs.reflectionremapper)
library(libs.kotlin.stdlib)
library(libs.kotlin.reflect)
library(libs.kotlin.serialization)
library(libs.kotlin.coroutines.core)
library(libs.kotlin.coroutines.jdk8)
// library(libs.kotlin.logging)
library(libs.mccoroutine.api)
library(libs.mccoroutine.core)
}
tasks {
shadowJar {
dependencies {
include(dependency("xyz.jpenilla:reflection-remapper"))
}
}
build {
dependsOn(shadowJar)
}
assemble {
dependsOn(reobfJar)
}
}
pitest {
mutationThreshold.set(0)
coverageThreshold.set(0)
}
koverReport {
verify {
rule {
bound {
minValue = 1
metric = kotlinx.kover.gradle.plugin.dsl.MetricType.INSTRUCTION
aggregation = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE
}
}
}
}
bukkit {
prefix = "kotlin"
description = "Kotlin dependency plugin"
load = PluginLoadOrder.STARTUP
main = "com.briarcraft.kotlin.KotlinPlugin"
}
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["apiElements"]) { skip() }
javaComponent.withVariantsFromConfiguration(configurations["runtimeElements"]) { skip() }
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() }
javaComponent.addVariantsFromConfiguration(configurations["reobf"]) {
mapToMavenScope("runtime")
dependencies {
configurations.library.get().allDependencies
.forEach {
add("reobf", "${it.group}:${it.name}:${it.version}")
}
}
}