From dbe58f135b73409a4c9ab51a134ac07c4cea9637 Mon Sep 17 00:00:00 2001 From: Kevin Belisle Date: Fri, 9 Jul 2021 00:49:45 -0400 Subject: [PATCH] Build frontend before kotlin --- app/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f4976af..96d2573 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -76,6 +76,16 @@ tasks.withType { duplicatesStrategy = DuplicatesStrategy.EXCLUDE manifest { attributes["Main-Class"] = "xyz.etztech.stonks.AppKt" } configurations["compileClasspath"].forEach { file: File -> from(zipTree(file.absoluteFile)) } + doFirst { + val proc = Runtime.getRuntime().exec("npm.cmd run --prefix ./spa build") + + // Read the output from the command + println("NPM RUN BUILD - STD INPUT") + proc.getInputStream().bufferedReader().forEachLine { println(it) } + + println("NPM RUN BUILD - STD ERROR") + proc.getErrorStream().bufferedReader().forEachLine { println(it) } + } } application {