build: 优化构建脚本

This commit is contained in:
2025-12-30 19:31:26 +08:00
parent b7fe2f03dd
commit a955ff8d42
2 changed files with 15 additions and 10 deletions

View File

@@ -26,15 +26,19 @@ dependencies {
compileOnly("me.clip:placeholderapi:2.11.6")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
}
sourceSets.create("templates") {
java {
srcDir("src/main/templates")
}
val templates = sourceSets.create("templates")!!
templates.java {
srcDir("src/main/templates")
}
val templateSource = file("src/main/templates")
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
val templateDest = layout.buildDirectory.dir("generated/sources/templates")!!
val generateTemplates = tasks.register<Copy>("generateTemplates") {
from(templateSource)
into(templateDest)
@@ -51,9 +55,6 @@ tasks {
from(rootProject.file("LICENSE"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
java {
withSourcesJar()
}
jar {
archiveBaseName = "HamsterBall-Bridge"
destinationDirectory = rootProject.layout.buildDirectory

View File

@@ -1,2 +1,6 @@
rootProject.name = "hamster-ball-bridge"
pluginManagement {
repositories {
maven("https://maven.airgame.net/maven-public/")
}
}
rootProject.name = "hamster-ball-bridge"