build: 优化构建脚本
This commit is contained in:
@@ -24,27 +24,26 @@ dependencies {
|
||||
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
withSourcesJar()
|
||||
}
|
||||
processResources {
|
||||
filesMatching("plugin.yml") {
|
||||
expand(project.properties)
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
jar {
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
}
|
||||
withType<JavaCompile>().configureEach {
|
||||
withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
withType<Jar>().configureEach {
|
||||
withType<Jar> {
|
||||
archiveBaseName = "HamsterScript"
|
||||
from(rootProject.file("LICENSE"))
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user