-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (60 loc) · 2 KB
/
Copy pathbuild.gradle
File metadata and controls
72 lines (60 loc) · 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
72
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group 'io.github.syferie.magicblock'
version '3.2.1.1'
repositories {
mavenCentral()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://repo.extendedclip.com/releases/' }
maven { url 'https://repo.papermc.io/repository/maven-public/' }
maven {
name = "tcoded-releases"
url = "https://repo.tcoded.com/releases"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly 'org.jetbrains:annotations:24.0.0'
implementation "com.tcoded:FoliaLib:0.5.1"
implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'com.google.code.gson:gson:2.10.1'
// 测试依赖
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
shadowJar {
// 重定位依赖包以避免冲突
relocate "com.alibaba.fastjson2", "io.github.syferie.magicblock.lib.fastjson"
relocate "com.tcoded.folialib", "io.github.syferie.magicblock.lib.folialib"
relocate "com.zaxxer.hikari", "io.github.syferie.magicblock.lib.hikari"
relocate "org.intellij.lang.annotations", "io.github.syferie.magicblock.lib.intellij.annotations"
relocate "org.jetbrains.annotations", "io.github.syferie.magicblock.lib.jetbrains.annotations"
relocate "org.slf4j", "io.github.syferie.magicblock.lib.slf4j"
relocate "com.google.gson", "io.github.syferie.magicblock.lib.gson"
// 排除不必要的文件
exclude "META-INF/"
exclude "schema/"
archiveFileName = "MagicBlock-${version}.jar"
}
jar {
enabled = false
}
artifacts {
archives shadowJar
}