diff options
author | 2022-11-22 19:16:47 +0100 | |
---|---|---|
committer | 2022-11-22 19:21:42 +0100 | |
commit | a8ffe38e6e5401011352cda5bc92a0a7a88ef40e (patch) | |
tree | 97f14cfb809f365aebfdbfaed43c8733aec930e6 /buildSrc/src/main/groovy | |
parent | fix(frontend): mobx 6.7.0 typing (diff) | |
download | refinery-a8ffe38e6e5401011352cda5bc92a0a7a88ef40e.tar.gz refinery-a8ffe38e6e5401011352cda5bc92a0a7a88ef40e.tar.zst refinery-a8ffe38e6e5401011352cda5bc92a0a7a88ef40e.zip |
chore: upgrade to Java 19
Use Java 19 and Jetty 12 to take advantage of Project Loom preview
features to reduce CPU usage due to XtextWebDocumentAccess thread pools.
Diffstat (limited to 'buildSrc/src/main/groovy')
-rw-r--r-- | buildSrc/src/main/groovy/refinery-java-application.gradle | 4 | ||||
-rw-r--r-- | buildSrc/src/main/groovy/refinery-java-conventions.gradle | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/buildSrc/src/main/groovy/refinery-java-application.gradle b/buildSrc/src/main/groovy/refinery-java-application.gradle index c38ccdb3..9abfc2b3 100644 --- a/buildSrc/src/main/groovy/refinery-java-application.gradle +++ b/buildSrc/src/main/groovy/refinery-java-application.gradle | |||
@@ -4,6 +4,10 @@ plugins { | |||
4 | id 'refinery-java-conventions' | 4 | id 'refinery-java-conventions' |
5 | } | 5 | } |
6 | 6 | ||
7 | application { | ||
8 | applicationDefaultJvmArgs += '--enable-preview' | ||
9 | } | ||
10 | |||
7 | for (taskName in ['distTar', 'distZip', 'shadowDistTar', 'shadowDistZip']) { | 11 | for (taskName in ['distTar', 'distZip', 'shadowDistTar', 'shadowDistZip']) { |
8 | tasks.named(taskName) { | 12 | tasks.named(taskName) { |
9 | enabled = false | 13 | enabled = false |
diff --git a/buildSrc/src/main/groovy/refinery-java-conventions.gradle b/buildSrc/src/main/groovy/refinery-java-conventions.gradle index b95153ce..eedefdf8 100644 --- a/buildSrc/src/main/groovy/refinery-java-conventions.gradle +++ b/buildSrc/src/main/groovy/refinery-java-conventions.gradle | |||
@@ -21,7 +21,7 @@ dependencies { | |||
21 | } | 21 | } |
22 | 22 | ||
23 | java.toolchain { | 23 | java.toolchain { |
24 | languageVersion = JavaLanguageVersion.of(17) | 24 | languageVersion = JavaLanguageVersion.of(19) |
25 | } | 25 | } |
26 | 26 | ||
27 | def jacocoTestReport = tasks.named('jacocoTestReport') | 27 | def jacocoTestReport = tasks.named('jacocoTestReport') |
@@ -53,6 +53,18 @@ tasks.named('jar') { | |||
53 | } | 53 | } |
54 | } | 54 | } |
55 | 55 | ||
56 | tasks.withType(JavaCompile) { | ||
57 | options.compilerArgs += '--enable-preview' | ||
58 | } | ||
59 | |||
60 | tasks.withType(Test) { | ||
61 | jvmArgs += '--enable-preview' | ||
62 | } | ||
63 | |||
64 | tasks.withType(JavaExec) { | ||
65 | jvmArgs += '--enable-preview' | ||
66 | } | ||
67 | |||
56 | def generateEclipseSourceFolders = tasks.register('generateEclipseSourceFolders') | 68 | def generateEclipseSourceFolders = tasks.register('generateEclipseSourceFolders') |
57 | 69 | ||
58 | tasks.register('prepareEclipse') { | 70 | tasks.register('prepareEclipse') { |