File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
buildSrc/src/main/java/org/springframework/boot/build/toolchain Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1616
1717package org .springframework .boot .build .toolchain ;
1818
19+ import java .util .ArrayList ;
1920import java .util .Collections ;
21+ import java .util .List ;
2022
2123import org .gradle .api .Plugin ;
2224import org .gradle .api .Project ;
@@ -71,8 +73,10 @@ private void disableToolchainTasks(Project project) {
7173 }
7274
7375 private void configureTestToolchain (Project project , ToolchainExtension toolchain ) {
74- project .getTasks ().withType (Test .class ,
75- (test ) -> test .jvmArgs (toolchain .getTestJvmArgs ().getOrElse (Collections .emptyList ())));
76+ List <String > jvmArgs = new ArrayList <>();
77+ jvmArgs .add ("--illegal-access=warn" );
78+ jvmArgs .addAll (toolchain .getTestJvmArgs ().getOrElse (Collections .emptyList ()));
79+ project .getTasks ().withType (Test .class , (test ) -> test .jvmArgs (jvmArgs ));
7680 }
7781
7882}
You can’t perform that action at this time.
0 commit comments