diff options
author | 2022-02-04 20:18:20 +0100 | |
---|---|---|
committer | 2022-02-04 20:18:20 +0100 | |
commit | 42db1e8b4dcff3667c5f14e8dd464309c3c2f23e (patch) | |
tree | f5f5efe86fb352980cf144cceb68d1a1101b274f /subprojects/language-web/build.gradle | |
parent | chore(web): fix Sonar issue (diff) | |
parent | chore(frontend): bump frontend dependencies (diff) | |
download | refinery-42db1e8b4dcff3667c5f14e8dd464309c3c2f23e.tar.gz refinery-42db1e8b4dcff3667c5f14e8dd464309c3c2f23e.tar.zst refinery-42db1e8b4dcff3667c5f14e8dd464309c3c2f23e.zip |
Merge pull request #18 from kris7t/releng-docs
Restructure project
Diffstat (limited to 'subprojects/language-web/build.gradle')
-rw-r--r-- | subprojects/language-web/build.gradle | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/subprojects/language-web/build.gradle b/subprojects/language-web/build.gradle new file mode 100644 index 00000000..a1d4753a --- /dev/null +++ b/subprojects/language-web/build.gradle | |||
@@ -0,0 +1,74 @@ | |||
1 | plugins { | ||
2 | id 'refinery-java-application' | ||
3 | id 'refinery-xtext-conventions' | ||
4 | } | ||
5 | |||
6 | configurations { | ||
7 | webapp { | ||
8 | canBeConsumed = false | ||
9 | canBeResolved = true | ||
10 | } | ||
11 | |||
12 | all { | ||
13 | // Use log4j-over-slf4j instead of log4j 1.x | ||
14 | exclude group: 'log4j', module: 'log4j' | ||
15 | } | ||
16 | } | ||
17 | |||
18 | dependencies { | ||
19 | implementation project(':refinery-language') | ||
20 | implementation project(':refinery-language-ide') | ||
21 | implementation libs.jetty.server | ||
22 | implementation libs.jetty.servlet | ||
23 | implementation libs.jetty.websocket.server | ||
24 | implementation libs.slf4j.api | ||
25 | implementation libs.slf4j.simple | ||
26 | implementation libs.slf4j.log4j | ||
27 | implementation libs.xtend.lib | ||
28 | implementation libs.xtext.web | ||
29 | webapp project(path: ':refinery-frontend', configuration: 'productionAssets') | ||
30 | testImplementation testFixtures(project(':refinery-language')) | ||
31 | testImplementation libs.jetty.websocket.client | ||
32 | } | ||
33 | |||
34 | def generateXtextLanguage = project(':refinery-language').tasks.named('generateXtextLanguage') | ||
35 | |||
36 | for (taskName in ['compileJava', 'processResources']) { | ||
37 | tasks.named(taskName) { | ||
38 | dependsOn generateXtextLanguage | ||
39 | } | ||
40 | } | ||
41 | |||
42 | mainClassName = 'tools.refinery.language.web.ServerLauncher' | ||
43 | |||
44 | tasks.named('jar') { | ||
45 | dependsOn project.configurations.webapp | ||
46 | from(project.configurations.webapp) { | ||
47 | into 'webapp' | ||
48 | } | ||
49 | } | ||
50 | |||
51 | tasks.named('shadowJar') { | ||
52 | dependsOn project.configurations.webapp | ||
53 | from(project.sourceSets.main.output) | ||
54 | configurations = [project.configurations.runtimeClasspath] | ||
55 | exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA','schema/*', | ||
56 | '.options', '.api_description', '*.profile', 'about.*', 'about_*.html', 'about_files/*', | ||
57 | 'plugin.xml', 'systembundle.properties', 'profile.list', 'META-INF/resources/xtext/**') | ||
58 | append('plugin.properties') | ||
59 | from(project.configurations.webapp) { | ||
60 | into 'webapp' | ||
61 | } | ||
62 | } | ||
63 | |||
64 | def jettyRun = tasks.register('jettyRun', JavaExec) { | ||
65 | dependsOn project.configurations.webapp | ||
66 | dependsOn sourceSets.main.runtimeClasspath | ||
67 | classpath = sourceSets.main.runtimeClasspath | ||
68 | mainClass = mainClassName | ||
69 | standardInput = System.in | ||
70 | def baseResource = project.configurations.webapp.incoming.artifacts.artifactFiles.first() | ||
71 | environment BASE_RESOURCE: baseResource | ||
72 | group = 'run' | ||
73 | description = 'Start a Jetty web server serving the Xtex API and assets.' | ||
74 | } | ||