build: 优化依赖
This commit is contained in:
@@ -1,22 +1,18 @@
|
||||
evaluationDependsOn(":ball-common")
|
||||
|
||||
dependencies {
|
||||
implementation(project(":ball-common")) { isTransitive = false }
|
||||
api(project(":ball-common")) { isTransitive = false }
|
||||
compileOnly("org.spigotmc:spigot-api:+")
|
||||
|
||||
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
|
||||
compileOnly("cn.hamster3.mc.plugin:core-bukkit:+")
|
||||
compileOnly("me.clip:placeholderapi:+") { isTransitive = false }
|
||||
|
||||
val hamsterCoreVersion = property("hamster_core_version")
|
||||
compileOnly("cn.hamster3.mc.plugin:core-bukkit:${hamsterCoreVersion}")
|
||||
compileOnly("me.clip:placeholderapi:2.11.2") { isTransitive = false }
|
||||
|
||||
val redissionVersion = property("redission_version")
|
||||
implementation("org.redisson:redisson:${redissionVersion}") {
|
||||
implementation("org.redisson:redisson:+") {
|
||||
exclude(group = "io.netty")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
filesMatching("plugin.yml") {
|
||||
|
@@ -1,25 +1,19 @@
|
||||
evaluationDependsOn(":ball-common")
|
||||
|
||||
dependencies {
|
||||
implementation(project(":ball-common")) { isTransitive = false }
|
||||
api(project(":ball-common")) { isTransitive = false }
|
||||
compileOnly("net.md-5:bungeecord-api:+")
|
||||
|
||||
compileOnly("net.md-5:bungeecord-api:1.20-R0.1-SNAPSHOT")
|
||||
compileOnly("cn.hamster3.mc.plugin:core-bungeecord:+")
|
||||
|
||||
val hamsterCoreVersion = property("hamster_core_version")
|
||||
compileOnly("cn.hamster3.mc.plugin:core-bungeecord:${hamsterCoreVersion}")
|
||||
compileOnly("me.clip:placeholderapi:2.11.2") { isTransitive = false }
|
||||
|
||||
val redissionVersion = property("redission_version")
|
||||
implementation("org.redisson:redisson:${redissionVersion}") {
|
||||
implementation("org.redisson:redisson:+") {
|
||||
exclude(group = "io.netty")
|
||||
exclude(group = "org.yaml")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
// https://mvnrepository.com/artifact/io.netty/netty-resolver-dns
|
||||
implementation("io.netty:netty-resolver-dns:4.1.96.Final")
|
||||
implementation("io.netty:netty-resolver-dns:+")
|
||||
}
|
||||
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
filesMatching("bungee.yml") {
|
||||
|
@@ -1,17 +1,12 @@
|
||||
@file:Suppress("VulnerableLibrariesLocal")
|
||||
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
||||
compileOnly("cn.hamster3.mc.plugin:core-common:+")
|
||||
|
||||
compileOnly("io.netty:netty-buffer:4+")
|
||||
compileOnly("com.google.code.gson:gson:2.8.0")
|
||||
|
||||
// https://mvnrepository.com/artifact/io.netty/netty-buffer
|
||||
compileOnly("io.netty:netty-buffer:4.1.96.Final")
|
||||
|
||||
val hamsterCoreVersion = property("hamster_core_version")
|
||||
compileOnly("cn.hamster3.mc.plugin:core-common:${hamsterCoreVersion}")
|
||||
|
||||
val redissionVersion = property("redission_version")
|
||||
implementation("org.redisson:redisson:${redissionVersion}") {
|
||||
implementation("org.redisson:redisson:+") {
|
||||
isTransitive = false
|
||||
exclude(group = "io.netty")
|
||||
exclude(group = "org.yaml")
|
||||
|
@@ -9,7 +9,7 @@ version = "1.1.0-SNAPSHOT"
|
||||
|
||||
subprojects {
|
||||
apply {
|
||||
plugin("java")
|
||||
plugin("java-library")
|
||||
plugin("maven-publish")
|
||||
plugin("com.github.johnrengelman.shadow")
|
||||
}
|
||||
@@ -24,40 +24,25 @@ subprojects {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
||||
implementation("org.jetbrains:annotations:24.0.1")
|
||||
// https://mvnrepository.com/artifact/org.projectlombok/lombok
|
||||
compileOnly("org.projectlombok:lombok:1.18.28")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.28")
|
||||
implementation("org.jetbrains:annotations:+")
|
||||
compileOnly("org.projectlombok:lombok:+")
|
||||
annotationProcessor("org.projectlombok:lombok:+")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
// withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
withType<Jar>().configureEach {
|
||||
withType<Jar> {
|
||||
from(rootProject.file("LICENSE"))
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
javadoc {
|
||||
options.jFlags("-Dfile.encoding=utf8")
|
||||
options.encoding = "UTF-8"
|
||||
options.quiet()
|
||||
val o: StandardJavadocDocletOptions = options as StandardJavadocDocletOptions
|
||||
o.addStringOption("Xdoclint:none", "-quiet")
|
||||
o.links(
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0",
|
||||
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0",
|
||||
"https://bukkit.windit.net/javadoc"
|
||||
)
|
||||
}
|
||||
shadowJar {
|
||||
relocate("org.yaml", "cn.hamster3.mc.plugin.ball.lib.org.yaml")
|
||||
destinationDirectory = rootProject.buildDir
|
||||
|
@@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx8G
|
||||
hamster_core_version=1.1.0-SNAPSHOT
|
||||
redission_version=3.23.2
|
Reference in New Issue
Block a user