File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,23 @@ compileTestJava {
134
134
options. compilerArgs = [" -Xlint:deprecation" ]
135
135
}
136
136
137
- // def testJava8 = tasks.register('testJava8', Test) {
138
- // description = 'Runs unit tests on Java 8.'
139
- // group = 'verification'
140
- //
141
- // javaLauncher.set(javaToolchains.launcherFor {
142
- // languageVersion = JavaLanguageVersion.of(8)
143
- // })
144
- // shouldRunAfter(tasks.named('test'))
145
- // }
137
+ def testJava8 = tasks. register(' testJava8' , Test ) {
138
+ description = ' Runs unit tests on Java 8.'
139
+ group = ' verification'
140
+
141
+ javaLauncher. set(javaToolchains. launcherFor {
142
+ languageVersion = JavaLanguageVersion . of(8 )
143
+ })
144
+ shouldRunAfter(tasks. named(' test' ))
145
+
146
+ doFirst {
147
+ tasks. compileJava. options. release. set(8 )
148
+ }
149
+
150
+ doLast {
151
+ tasks. compileJava. options. release. set(11 )
152
+ }
153
+ }
146
154
147
155
def testJava17 = tasks. register(' testJava17' , Test ) {
148
156
description = ' Runs unit tests on Java 17.'
You can’t perform that action at this time.
0 commit comments