-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (60 loc) · 2.2 KB
/
Copy pathbuild.gradle
File metadata and controls
71 lines (60 loc) · 2.2 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
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.4.1'
id 'jacoco'
}
group = 'de.thomasuebel.mc.ts3bridge'
version = '1.1.8-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT'
implementation 'com.github.theholywaffle:teamspeak3-api:1.3.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation("org.bstats:bstats-bukkit:3.2.1")
testImplementation platform('org.junit:junit-bom:5.10.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.15.2'
testImplementation 'org.mockito:mockito-junit-jupiter:5.15.2'
testImplementation 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT'
}
processResources {
inputs.property('version', project.version)
filesMatching('plugin.yml') {
expand(version: project.version)
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
// MctsPlugin is framework wiring (JavaPlugin lifecycle); testable only via integration tests.
// TeamspeakConnection wraps the HolyWaffle TS3 client; it requires a live ServerQuery port.
// Both are excluded from coverage metrics to avoid deflating the reported percentage.
classDirectories.setFrom(
fileTree(dir: layout.buildDirectory.dir('classes/java/main').get().asFile, excludes: [
'de/thomasuebel/mc/ts3bridge/minecraft/MctsPlugin.class',
'de/thomasuebel/mc/ts3bridge/teamspeak/TeamspeakConnection.class'
])
)
}
shadowJar {
// Relocation disabled: Paper's plugin classloader provides isolation.
// Re-enable if classpath conflicts arise with other plugins.
archiveClassifier = ''
// bStats must always be relocated to avoid version conflicts with other plugins.
relocate 'org.bstats', 'de.thomasuebel.mc.ts3bridge.bstats'
}
build.dependsOn shadowJar