-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
92 lines (77 loc) · 2.37 KB
/
build.gradle.kts
File metadata and controls
92 lines (77 loc) · 2.37 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
81
82
83
84
85
86
87
88
89
90
91
92
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("io.freefair.lombok") version "8.12.2.1"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("maven-publish")
}
group = "dev.brauw.mapper"
version = "1.0.8"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
implementation("com.fasterxml.jackson.core:jackson-databind:2.16.1")
implementation("com.fasterxml.jackson.core:jackson-annotations:2.16.1")
implementation("xyz.xenondevs.invui:invui:1.49")
implementation("org.incendo:cloud-core:2.0.0")
implementation("org.incendo:cloud-annotations:2.0.0")
implementation("org.incendo:cloud-paper:2.0.0-beta.10")
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.105.0") {
exclude(group = "org.junit")
exclude(group = "org.junit.jupiter")
exclude(group = "org.junit.platform")
}
testImplementation("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
testImplementation(platform("org.junit:junit-bom:5.12.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
sourceSets {
main {
resources {
srcDir("src/main/resources")
}
}
}
tasks.withType<ShadowJar> {
archiveBaseName = "mapper-plugin"
archiveVersion = ""
archiveClassifier = ""
from(sourceSets.main.get().output)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
publishing {
publications {
create<MavenPublication>("Mapper") {
// Use the shadow JAR as the primary artifact
artifact(tasks["shadowJar"])
// Exclude the default JAR
artifact(tasks["jar"]) {
classifier = "original"
}
pom {
name.set("Mapper")
description.set("Mapper plugin")
}
}
}
}
tasks.named<Copy>("processResources") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.build {
dependsOn("shadowJar")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks.test {
useJUnitPlatform()
}