Skip to content

Commit

Permalink
feat: gradle task for webapp build
Browse files Browse the repository at this point in the history
  • Loading branch information
MrExplode committed Nov 11, 2024
1 parent 4154cde commit 459d09b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
import org.apache.tools.ant.taskdefs.condition.Os

plugins {
java
Expand Down Expand Up @@ -48,3 +49,15 @@ tasks.assemble {
dependsOn(tasks.shadowJar)
}

tasks.register("build-webapp", Exec::class.java) {
workingDir = layout.projectDirectory.dir("webapp").asFile
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd.exe", "/c", "pnpm", "run", "build")
} else {
commandLine("bash", "-c", "pnpm", "run", "build")
}
doLast {
println("Webapp build done!")
}
}

0 comments on commit 459d09b

Please sign in to comment.