build: 优化构建脚本

This commit is contained in:
2023-08-20 17:13:02 +08:00
parent 9e6d39469d
commit 67ca9453b3
4 changed files with 5 additions and 9 deletions

View File

@@ -39,10 +39,10 @@ subprojects {
} }
tasks { tasks {
withType<JavaCompile>().configureEach { withType<JavaCompile>() {
options.encoding = "UTF-8" options.encoding = "UTF-8"
} }
withType<Jar>().configureEach { withType<Jar>() {
from(rootProject.file("LICENSE")) from(rootProject.file("LICENSE"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
} }
@@ -61,7 +61,6 @@ subprojects {
"http://milkbowl.github.io/VaultAPI", "http://milkbowl.github.io/VaultAPI",
"https://bukkit.windit.net/javadoc" "https://bukkit.windit.net/javadoc"
) )
} }
shadowJar { shadowJar {
archiveClassifier = "" archiveClassifier = ""

View File

@@ -46,7 +46,7 @@ tasks {
expand(project.properties) expand(project.properties)
} }
} }
shadowJar { withType<Jar>() {
archiveBaseName = "HamsterCore-Bukkit" archiveBaseName = "HamsterCore-Bukkit"
} }
} }

View File

@@ -39,7 +39,7 @@ tasks {
expand(project.properties) expand(project.properties)
} }
} }
shadowJar { withType<Jar>() {
archiveBaseName = "HamsterCore-BungeeCord" archiveBaseName = "HamsterCore-BungeeCord"
} }
} }

View File

@@ -28,10 +28,7 @@ dependencies {
} }
tasks { tasks {
test { withType<Jar>() {
useJUnitPlatform()
}
shadowJar {
archiveBaseName = "HamsterCore-Common" archiveBaseName = "HamsterCore-Common"
} }
} }