mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Fix JDK 16 pipeline
See gh-27310
This commit is contained in:
parent
49b700d290
commit
e4978f604c
@ -16,7 +16,9 @@
|
||||
|
||||
package org.springframework.boot.build.toolchain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
@ -71,8 +73,10 @@ public class ToolchainPlugin implements Plugin<Project> {
|
||||
}
|
||||
|
||||
private void configureTestToolchain(Project project, ToolchainExtension toolchain) {
|
||||
project.getTasks().withType(Test.class,
|
||||
(test) -> test.jvmArgs(toolchain.getTestJvmArgs().getOrElse(Collections.emptyList())));
|
||||
List<String> jvmArgs = new ArrayList<>();
|
||||
jvmArgs.add("--illegal-access=warn");
|
||||
jvmArgs.addAll(toolchain.getTestJvmArgs().getOrElse(Collections.emptyList()));
|
||||
project.getTasks().withType(Test.class, (test) -> test.jvmArgs(jvmArgs));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user