Skip to content

Commit

Permalink
build: build frontend only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
D-D-H committed Oct 21, 2023
1 parent 81b1927 commit 3575a91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/server.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,17 @@ tasks.named('compileJava') {
inputs.files(tasks.named('processResources'))
}

import java.nio.file.Files

tasks.named("processResources") {
dependsOn(':frontend:build')
if (!Files.exists(projectDir.toPath().resolve("src/main/resources/static"))
|| gradle.startParameter.taskNames.contains("clean")) {
dependsOn(':frontend:build')
}
}

tasks.named("clean") {
delete(projectDir.toPath().resolve("src/main/resources/static"))
}

// for kryo
Expand Down

0 comments on commit 3575a91

Please sign in to comment.