mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-01-24 09:11:20 +01:00
Only rebuild webapp if clean-build or there were changes
This commit is contained in:
parent
d77d90c658
commit
3faf2f0135
@ -70,12 +70,14 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.register("buildWebapp", type = NpmTask::class) {
|
||||
tasks.clean {
|
||||
doFirst {
|
||||
if (!file("webapp/dist/").deleteRecursively())
|
||||
throw IOException("Failed to delete build directory!")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("buildWebapp", type = NpmTask::class) {
|
||||
dependsOn ("npmInstall")
|
||||
args.set(listOf("run", "build"))
|
||||
|
||||
@ -89,7 +91,6 @@ tasks.register("zipWebapp", type = Zip::class) {
|
||||
archiveFileName.set("webapp.zip")
|
||||
destinationDirectory.set(file("src/main/resources/de/bluecolored/bluemap/"))
|
||||
|
||||
//outputs.upToDateWhen { false }
|
||||
inputs.dir("webapp/dist/")
|
||||
outputs.file("src/main/resources/de/bluecolored/bluemap/webapp.zip")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user