build: 优化依赖

This commit is contained in:
2023-10-12 14:51:42 +08:00
parent 46997d6c17
commit b4eed3133b
9 changed files with 50 additions and 105 deletions

View File

@@ -4,29 +4,19 @@ dependencies {
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compileOnly("com.google.code.gson:gson:2.8.0")
val adventureVersion = property("adventure_version")
// https://mvnrepository.com/artifact/net.kyori/adventure-platform-api
implementation("net.kyori:adventure-platform-api:${adventureVersion}") {
exclude(group = "org.jetbrains")
}
val adventureSerializerVersion = property("adventure_serializer_version")
// https://mvnrepository.com/artifact/net.kyori/adventure-text-minimessage
implementation("net.kyori:adventure-text-minimessage:${adventureSerializerVersion}") {
api("net.kyori:adventure-platform-api:4+") {
exclude(group = "org.jetbrains")
}
// https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-gson
implementation("net.kyori:adventure-text-serializer-gson:${adventureSerializerVersion}") {
api("net.kyori:adventure-text-serializer-gson:4.13+") {
exclude(group = "org.jetbrains")
exclude(group = "com.google.code.gson")
}
// https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-legacy
implementation("net.kyori:adventure-text-serializer-legacy:${adventureSerializerVersion}") {
exclude(group = "org.jetbrains")
}
}
tasks {
withType<Jar>() {
withType<Jar> {
archiveBaseName = "HamsterCore-Common"
}
}