diff options
Diffstat (limited to 'language-web')
-rw-r--r-- | language-web/build.gradle | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/language-web/build.gradle b/language-web/build.gradle index 19a378f8..888cbb5c 100644 --- a/language-web/build.gradle +++ b/language-web/build.gradle | |||
@@ -12,19 +12,17 @@ dependencies { | |||
12 | implementation "org.slf4j:slf4j-simple:${slf4JVersion}" | 12 | implementation "org.slf4j:slf4j-simple:${slf4JVersion}" |
13 | } | 13 | } |
14 | 14 | ||
15 | def generateXtext = project(':refinery-language').tasks.named('generateXtext') | 15 | def generateXtextLanguage = project(':refinery-language').tasks.named('generateXtextLanguage') |
16 | 16 | ||
17 | tasks.named('compileJava') { | 17 | for (taskName in ['compileJava', 'processResources']) { |
18 | dependsOn generateXtext | 18 | tasks.named(taskName) { |
19 | } | 19 | dependsOn generateXtextLanguage |
20 | 20 | } | |
21 | tasks.named('processResources') { | ||
22 | dependsOn generateXtext | ||
23 | } | 21 | } |
24 | 22 | ||
25 | def webpackOutputDir = "${buildDir}/webpack" | 23 | def webpackOutputDir = "${buildDir}/webpack" |
26 | def productionResources = "${webpackOutputDir}/production" | 24 | def productionResources = "${webpackOutputDir}/production" |
27 | def mainClass = 'org.eclipse.viatra.solver.language.web.ServerLauncher' | 25 | def serverMainClass = 'org.eclipse.viatra.solver.language.web.ServerLauncher' |
28 | 26 | ||
29 | apply plugin: 'org.siouan.frontend-jdk11' | 27 | apply plugin: 'org.siouan.frontend-jdk11' |
30 | import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn | 28 | import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn |
@@ -42,7 +40,7 @@ def installFrontend = tasks.named('installFrontend') | |||
42 | 40 | ||
43 | def assembleFrontend = tasks.named('assembleFrontend') | 41 | def assembleFrontend = tasks.named('assembleFrontend') |
44 | assembleFrontend.configure { | 42 | assembleFrontend.configure { |
45 | dependsOn generateXtext | 43 | dependsOn generateXtextLanguage |
46 | inputs.dir 'src/main/css' | 44 | inputs.dir 'src/main/css' |
47 | inputs.dir 'src/main/html' | 45 | inputs.dir 'src/main/html' |
48 | inputs.dir 'src/main/js' | 46 | inputs.dir 'src/main/js' |
@@ -53,7 +51,7 @@ assembleFrontend.configure { | |||
53 | 51 | ||
54 | tasks.register('webpackStats', RunNpmYarn) { | 52 | tasks.register('webpackStats', RunNpmYarn) { |
55 | dependsOn installFrontend | 53 | dependsOn installFrontend |
56 | dependsOn generateXtext | 54 | dependsOn generateXtextLanguage |
57 | inputs.dir 'src/main/css' | 55 | inputs.dir 'src/main/css' |
58 | inputs.dir 'src/main/html' | 56 | inputs.dir 'src/main/html' |
59 | inputs.dir 'src/main/js' | 57 | inputs.dir 'src/main/js' |
@@ -93,7 +91,7 @@ tasks.named('jar') { | |||
93 | } | 91 | } |
94 | 92 | ||
95 | apply plugin: 'application' | 93 | apply plugin: 'application' |
96 | mainClassName = mainClass | 94 | mainClassName = serverMainClass |
97 | distTar.enabled = false | 95 | distTar.enabled = false |
98 | distZip.enabled = false | 96 | distZip.enabled = false |
99 | 97 | ||
@@ -118,7 +116,7 @@ def jettyRun = tasks.register('jettyRun', JavaExec) { | |||
118 | dependsOn assembleFrontend | 116 | dependsOn assembleFrontend |
119 | dependsOn sourceSets.main.runtimeClasspath | 117 | dependsOn sourceSets.main.runtimeClasspath |
120 | classpath = sourceSets.main.runtimeClasspath.filter{it.exists()} | 118 | classpath = sourceSets.main.runtimeClasspath.filter{it.exists()} |
121 | main = mainClass | 119 | mainClass = serverMainClass |
122 | standardInput = System.in | 120 | standardInput = System.in |
123 | environment BASE_RESOURCE: productionResources | 121 | environment BASE_RESOURCE: productionResources |
124 | group = 'run' | 122 | group = 'run' |
@@ -127,7 +125,7 @@ def jettyRun = tasks.register('jettyRun', JavaExec) { | |||
127 | 125 | ||
128 | tasks.register('webpackServe', RunNpmYarn) { | 126 | tasks.register('webpackServe', RunNpmYarn) { |
129 | dependsOn installFrontend | 127 | dependsOn installFrontend |
130 | dependsOn generateXtext | 128 | dependsOn generateXtextLanguage |
131 | outputs.dir "${webpackOutputDir}/development" | 129 | outputs.dir "${webpackOutputDir}/development" |
132 | script = 'run serve' | 130 | script = 'run serve' |
133 | group = 'run' | 131 | group = 'run' |
@@ -145,9 +143,3 @@ sonarqube.properties { | |||
145 | 'src/main/js/xtext/**', | 143 | 'src/main/js/xtext/**', |
146 | ] | 144 | ] |
147 | } | 145 | } |
148 | |||
149 | eclipse { | ||
150 | project.file.whenMerged { | ||
151 | natures.remove('org.eclipse.wst.common.modulecore.ModuleCoreNature') | ||
152 | } | ||
153 | } | ||