diff options
author | Vitaly Takmazov | 2019-10-22 11:49:27 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-10-22 11:49:27 +0300 |
commit | f00be8c6d4b1d420119f9f08d400719fd62d2d39 (patch) | |
tree | d6f687d990e1bd1675a2f0cd8a2d2aa089fdc379 | |
parent | 7d4e21503e048cc1de53e5608692881abb9a52d5 (diff) |
yarn and yarnCompile tasks
-rw-r--r-- | build.gradle | 14 |
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 |