aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle14
1 files changed, 12 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index 242cb14f..b637ae6c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,9 +46,18 @@ apply plugin: 'io.github.swagger2markup'
apply plugin: 'org.asciidoctor.convert'
task yarn(type: Exec) {
+ inputs.file('yarn.lock')
+ outputs.file('yarn.lock')
+ if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) {
+ commandLine 'cmd', '/c', 'yarn'
+ } else {
+ commandLine 'yarn'
+ }
+}
+
+task yarnCompile(type: Exec) {
inputs.files(fileTree('node_modules'))
inputs.files(fileTree('src'))
- inputs.file('yarn.lock')
inputs.file('webpack.config.js')
outputs.dir('src/main/resources/static')
if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) {
@@ -181,7 +190,8 @@ bootRun {
sourceResources sourceSets.main
}
-processResources.dependsOn 'yarn'
+yarnCompile.dependsOn 'yarn'
+processResources.dependsOn 'yarnCompile'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11