diff options
Diffstat (limited to 'subprojects/language-web/build.gradle')
-rw-r--r-- | subprojects/language-web/build.gradle | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/subprojects/language-web/build.gradle b/subprojects/language-web/build.gradle index 9c1d93f3..8d277a5b 100644 --- a/subprojects/language-web/build.gradle +++ b/subprojects/language-web/build.gradle | |||
@@ -40,6 +40,18 @@ for (taskName in ['compileJava', 'processResources']) { | |||
40 | 40 | ||
41 | mainClassName = 'tools.refinery.language.web.ServerLauncher' | 41 | mainClassName = 'tools.refinery.language.web.ServerLauncher' |
42 | 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 | |||
43 | tasks.named('jar') { | 55 | tasks.named('jar') { |
44 | dependsOn project.configurations.webapp | 56 | dependsOn project.configurations.webapp |
45 | from(project.configurations.webapp) { | 57 | from(project.configurations.webapp) { |
@@ -65,6 +77,8 @@ tasks.register('serveBackend', JavaExec) { | |||
65 | dependsOn sourceSets.main.runtimeClasspath | 77 | dependsOn sourceSets.main.runtimeClasspath |
66 | classpath = sourceSets.main.runtimeClasspath | 78 | classpath = sourceSets.main.runtimeClasspath |
67 | mainClass = mainClassName | 79 | mainClass = mainClassName |
80 | // Enable JDK 19 preview features for virtual thread support. | ||
81 | jvmArgs += '--enable-preview' | ||
68 | standardInput = System.in | 82 | standardInput = System.in |
69 | def baseResource = project.configurations.webapp.incoming.artifacts.artifactFiles.first() | 83 | def baseResource = project.configurations.webapp.incoming.artifacts.artifactFiles.first() |
70 | environment BASE_RESOURCE: baseResource | 84 | environment BASE_RESOURCE: baseResource |