aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/language-web/build.gradle.kts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-04-15 19:33:07 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-04-15 19:33:07 +0200
commit2731c799e31d19a801142cd99460da45ae2e368f (patch)
tree5e494210972630bd37f4d61b1c9f1dcadb0cd80f /subprojects/language-web/build.gradle.kts
parentrefactor: remove virtual thread support (diff)
downloadrefinery-2731c799e31d19a801142cd99460da45ae2e368f.tar.gz
refinery-2731c799e31d19a801142cd99460da45ae2e368f.tar.zst
refinery-2731c799e31d19a801142cd99460da45ae2e368f.zip
chore(deps): downgrade to Java 17
Java 19 is out of support, but Gradle current does not run on Java 20: https://github.com/gradle/gradle/issues/23488 To avoid the complexity of running the build tool on a different JDK than the application, we temporarily remove code that depends on experimental Java 19 or Java 20 features. Revert once the build can run on Java 20.
Diffstat (limited to 'subprojects/language-web/build.gradle.kts')
-rw-r--r--subprojects/language-web/build.gradle.kts18
1 files changed, 0 insertions, 18 deletions
diff --git a/subprojects/language-web/build.gradle.kts b/subprojects/language-web/build.gradle.kts
index e1d250ec..d398e002 100644
--- a/subprojects/language-web/build.gradle.kts
+++ b/subprojects/language-web/build.gradle.kts
@@ -29,13 +29,6 @@ dependencies {
29 29
30application { 30application {
31 mainClass.set("tools.refinery.language.web.ServerLauncher") 31 mainClass.set("tools.refinery.language.web.ServerLauncher")
32 // Enable JDK 19 preview features for virtual thread support.
33 applicationDefaultJvmArgs += "--enable-preview"
34}
35
36// Enable JDK 19 preview features for virtual thread support.
37fun enablePreview(task: JavaForkOptions) {
38 task.jvmArgs("--enable-preview")
39} 32}
40 33
41tasks { 34tasks {
@@ -47,16 +40,6 @@ tasks {
47 } 40 }
48 } 41 }
49 42
50 withType(JavaCompile::class) {
51 options.release.set(19)
52 // Enable JDK 19 preview features for virtual thread support.
53 options.compilerArgs.plusAssign("--enable-preview")
54 }
55
56 withType(Test::class) {
57 enablePreview(this)
58 }
59
60 jar { 43 jar {
61 dependsOn(webapp) 44 dependsOn(webapp)
62 from(webapp) { 45 from(webapp) {
@@ -82,7 +65,6 @@ tasks {
82 dependsOn(mainRuntimeClasspath) 65 dependsOn(mainRuntimeClasspath)
83 classpath(mainRuntimeClasspath) 66 classpath(mainRuntimeClasspath)
84 mainClass.set(application.mainClass) 67 mainClass.set(application.mainClass)
85 enablePreview(this)
86 standardInput = System.`in` 68 standardInput = System.`in`
87 val baseResource = webapp.incoming.artifacts.artifactFiles.first() 69 val baseResource = webapp.incoming.artifacts.artifactFiles.first()
88 environment("BASE_RESOURCE", baseResource) 70 environment("BASE_RESOURCE", baseResource)