diff options
author | Vitaly Takmazov | 2020-10-11 23:18:20 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-10-11 23:18:20 +0300 |
commit | 318e0cfda08c35b87e56969d3f320889de6bbc0f (patch) | |
tree | 2d51b4477de8f8103fcb14e72e9e459282680b1a | |
parent | 328c10c18348ff2df2548db48fb4beaa451d2f25 (diff) |
Gradle: yarn->npm
-rw-r--r-- | build.gradle | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle index af588130..a21113c1 100644 --- a/build.gradle +++ b/build.gradle @@ -44,25 +44,25 @@ apply plugin: 'java' apply plugin: 'org.springframework.boot' apply plugin: 'io.github.swagger2markup' -task yarn(type: Exec) { - inputs.file('yarn.lock') - outputs.file('yarn.lock') +task npmInstall(type: Exec) { + inputs.file('package-lock.json') + outputs.file('package-lock.json') if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) { - commandLine 'cmd', '/c', 'npx', 'yarn' + commandLine 'cmd', '/c', 'npm', 'install' } else { - commandLine 'npx', 'yarn' + commandLine 'npm', 'install' } } -task yarnCompile(type: Exec) { +task npmCompile(type: Exec) { inputs.files(fileTree('node_modules')) inputs.files(fileTree('src')) inputs.file('webpack.config.js') outputs.dir('src/main/resources/static') if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) { - commandLine 'cmd', '/c', 'npx', 'yarn', 'compile' + commandLine 'cmd', '/c', 'npm', 'run', 'compile' } else { - commandLine 'npx', 'yarn', 'compile' + commandLine 'npm', 'run', 'compile' } } @@ -194,8 +194,8 @@ bootRun { sourceResources sourceSets.main } -yarnCompile.dependsOn 'yarn' -processResources.dependsOn 'yarnCompile' +npmCompile.dependsOn 'npmInstall' +processResources.dependsOn 'npmCompile' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 |