diff options
Diffstat (limited to 'buildSrc/src/main')
-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') { |