diff options
Diffstat (limited to 'language-web')
-rw-r--r-- | language-web/build.gradle | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/language-web/build.gradle b/language-web/build.gradle index dcb69406..e04af7cb 100644 --- a/language-web/build.gradle +++ b/language-web/build.gradle | |||
@@ -17,10 +17,17 @@ def currentNodeEnv = devMode ? 'development' : 'production' | |||
17 | 17 | ||
18 | apply plugin: 'com.moowork.node' | 18 | apply plugin: 'com.moowork.node' |
19 | 19 | ||
20 | node { | ||
21 | version = nodeVersion | ||
22 | npmVersion = project.ext.npmVersion | ||
23 | download = true | ||
24 | } | ||
25 | |||
20 | for (environment in ['production', 'development']) { | 26 | for (environment in ['production', 'development']) { |
21 | def taskName = 'webpack' + environment.substring(0, 1).toUpperCase() + environment.substring(1); | 27 | def taskName = 'webpack' + environment.substring(0, 1).toUpperCase() + environment.substring(1); |
22 | task(taskName, type: NpmTask) { | 28 | task(taskName, type: NpmTask) { |
23 | dependsOn ':language:generateXtext' | 29 | dependsOn ':language:generateXtext' |
30 | dependsOn npmInstall | ||
24 | inputs.dir 'src/main/css' | 31 | inputs.dir 'src/main/css' |
25 | inputs.dir 'src/main/html' | 32 | inputs.dir 'src/main/html' |
26 | inputs.dir 'src/main/js' | 33 | inputs.dir 'src/main/js' |
@@ -34,6 +41,7 @@ for (environment in ['production', 'development']) { | |||
34 | 41 | ||
35 | apply plugin: 'application' | 42 | apply plugin: 'application' |
36 | mainClassName = mainClass | 43 | mainClassName = mainClass |
44 | distTar.enabled = false | ||
37 | distZip.enabled = false | 45 | distZip.enabled = false |
38 | 46 | ||
39 | jar { | 47 | jar { |
@@ -44,6 +52,7 @@ jar { | |||
44 | } | 52 | } |
45 | 53 | ||
46 | apply plugin: 'com.github.johnrengelman.shadow' | 54 | apply plugin: 'com.github.johnrengelman.shadow' |
55 | shadowDistTar.enabled = false | ||
47 | shadowDistZip.enabled = false | 56 | shadowDistZip.enabled = false |
48 | 57 | ||
49 | shadowJar { | 58 | shadowJar { |
@@ -76,6 +85,7 @@ task jettyRun(type: JavaExec) { | |||
76 | 85 | ||
77 | task webpackServe(type: NpmTask) { | 86 | task webpackServe(type: NpmTask) { |
78 | dependsOn ':language:generateXtext' | 87 | dependsOn ':language:generateXtext' |
88 | dependsOn npmInstall | ||
79 | outputs.dir "${webpackOutputDir}/hmr" | 89 | outputs.dir "${webpackOutputDir}/hmr" |
80 | args = ['run', 'serve'] | 90 | args = ['run', 'serve'] |
81 | setEnvironment NODE_ENV: 'hmr' | 91 | setEnvironment NODE_ENV: 'hmr' |