diff options
Diffstat (limited to 'subprojects/language-web/build.gradle')
-rw-r--r-- | subprojects/language-web/build.gradle | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/subprojects/language-web/build.gradle b/subprojects/language-web/build.gradle deleted file mode 100644 index 8d277a5b..00000000 --- a/subprojects/language-web/build.gradle +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
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.xtext.web | ||
28 | webapp project(path: ':refinery-frontend', configuration: 'productionAssets') | ||
29 | testImplementation testFixtures(project(':refinery-language')) | ||
30 | testImplementation libs.jetty.websocket.client | ||
31 | } | ||
32 | |||
33 | def generateXtextLanguage = project(':refinery-language').tasks.named('generateXtextLanguage') | ||
34 | |||
35 | for (taskName in ['compileJava', 'processResources']) { | ||
36 | tasks.named(taskName) { | ||
37 | dependsOn generateXtextLanguage | ||
38 | } | ||
39 | } | ||
40 | |||
41 | mainClassName = 'tools.refinery.language.web.ServerLauncher' | ||
42 | |||
43 | // Enable JDK 19 preview features for virtual thread support. | ||
44 | application { | ||
45 | applicationDefaultJvmArgs += '--enable-preview' | ||
46 | } | ||
47 | tasks.withType(JavaCompile) { | ||
48 | options.release = 19 | ||
49 | options.compilerArgs += '--enable-preview' | ||
50 | } | ||
51 | tasks.withType(Test) { | ||
52 | jvmArgs += '--enable-preview' | ||
53 | } | ||
54 | |||
55 | tasks.named('jar') { | ||
56 | dependsOn project.configurations.webapp | ||
57 | from(project.configurations.webapp) { | ||
58 | into 'webapp' | ||
59 | } | ||
60 | } | ||
61 | |||
62 | tasks.named('shadowJar') { | ||
63 | dependsOn project.configurations.webapp | ||
64 | from(project.sourceSets.main.output) | ||
65 | configurations = [project.configurations.runtimeClasspath] | ||
66 | exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA','schema/*', | ||
67 | '.options', '.api_description', '*.profile', 'about.*', 'about_*.html', 'about_files/*', | ||
68 | 'plugin.xml', 'systembundle.properties', 'profile.list', 'META-INF/resources/xtext/**') | ||
69 | append('plugin.properties') | ||
70 | from(project.configurations.webapp) { | ||
71 | into 'webapp' | ||
72 | } | ||
73 | } | ||
74 | |||
75 | tasks.register('serveBackend', JavaExec) { | ||
76 | dependsOn project.configurations.webapp | ||
77 | dependsOn sourceSets.main.runtimeClasspath | ||
78 | classpath = sourceSets.main.runtimeClasspath | ||
79 | mainClass = mainClassName | ||
80 | // Enable JDK 19 preview features for virtual thread support. | ||
81 | jvmArgs += '--enable-preview' | ||
82 | standardInput = System.in | ||
83 | def baseResource = project.configurations.webapp.incoming.artifacts.artifactFiles.first() | ||
84 | environment BASE_RESOURCE: baseResource | ||
85 | group = 'run' | ||
86 | description = 'Start a Jetty web server serving the Xtex API and assets.' | ||
87 | } | ||