aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-22 11:49:27 +0300
committerGravatar Vitaly Takmazov2019-10-22 11:49:27 +0300
commitf00be8c6d4b1d420119f9f08d400719fd62d2d39 (patch)
treed6f687d990e1bd1675a2f0cd8a2d2aa089fdc379
parent7d4e21503e048cc1de53e5608692881abb9a52d5 (diff)
yarn and yarnCompile tasks
-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