From 2f3b41c03c1c0c0cc037aad12fd5f2ab27bf7b0a Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 17 May 2020 17:47:46 +0200 Subject: Fix static inclusion from frontend --- sw-server/build.gradle.kts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sw-server/build.gradle.kts') diff --git a/sw-server/build.gradle.kts b/sw-server/build.gradle.kts index 66e70dbb..0d5612c1 100644 --- a/sw-server/build.gradle.kts +++ b/sw-server/build.gradle.kts @@ -36,12 +36,14 @@ dependencies { testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin") } -// packages the frontend app within the jar -tasks.bootJar { - from("../sw-ui/build/processedResources/Js/main") { +tasks.processResources { + // package the frontend app within the jar as static + val frontendBuildDir = project(":sw-ui").buildDir + val frontendDist = frontendBuildDir.toPath().resolve("distributions") + from(frontendDist) { + include("**/*") into("static") } } - // make sure we build the frontend before creating the jar -tasks.bootJar.get().dependsOn(":sw-ui:assemble") +tasks.processResources.get().dependsOn(":sw-ui:assemble") -- cgit