From 83c295b07fb77927eb4486eb850601d7047970f5 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Sun, 3 Nov 2024 22:15:41 +0100 Subject: [PATCH] chore(ui): register build task into gradle assemble lifecycle Now, Intellij will include the ui when the application is started via the Application class (as alternative to gradle bootRun task) --- springwolf-ui/build.gradle | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/springwolf-ui/build.gradle b/springwolf-ui/build.gradle index da761c663..26fdf7016 100644 --- a/springwolf-ui/build.gradle +++ b/springwolf-ui/build.gradle @@ -9,8 +9,10 @@ node { download = true } -npm_run_build { - dependsOn spotlessCheck +tasks.register('npm_run_build', NpmTask) { + dependsOn npmInstall, spotlessCheck + + args = ['run', 'build'] inputs.files fileTree("src") inputs.file 'angular.json' @@ -19,13 +21,20 @@ npm_run_build { outputs.dir 'build' } +assemble.dependsOn('npm_run_build') + +tasks.register('npm_run_test', NpmTask) { + dependsOn npmInstall + + args = ['run', 'test'] -npm_run_test { inputs.files fileTree("src") inputs.file 'angular.json' inputs.file 'package.json' inputs.file 'package-lock.json' + outputs.upToDateWhen { true } } +test.dependsOn('npm_run_test') tasks.register('buildPages', NpmTask) { args = ['run', 'build_pages']