diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/build.gradle b/build.gradle index 6218cdde..de529d95 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform + buildscript { repositories { mavenCentral() @@ -10,7 +12,6 @@ buildscript { } plugins { id 'org.springframework.boot' version '2.2.0.RELEASE' apply false - id "com.moowork.node" version "1.3.1" apply false id("org.asciidoctor.convert") version "2.3.0" apply false } @@ -41,17 +42,20 @@ dependencyUpdates.resolutionStrategy = { } apply plugin: 'java' apply plugin: 'org.springframework.boot' -apply plugin: 'com.moowork.node' apply plugin: 'io.github.swagger2markup' apply plugin: 'org.asciidoctor.convert' -task compileFrontend(type: YarnTask) { +task yarn(type: Exec) { inputs.files(fileTree('node_modules')) inputs.files(fileTree('src')) - inputs.file('package.json') + inputs.file('yarn.lock') inputs.file('webpack.config.js') outputs.dir('src/main/resources/static') - args = ['run', 'compile'] + if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) { + commandLine 'cmd', '/c', 'yarn', 'run', 'compile' + } else { + commandLine 'yarn', 'run', 'compile' + } } ext { @@ -180,8 +184,7 @@ bootRun { sourceResources sourceSets.main } -compileFrontend.dependsOn 'yarn' -processResources.dependsOn 'compileFrontend' +processResources.dependsOn 'yarn' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 |