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 16
16
17
17
package org .springframework .boot .build .toolchain ;
18
18
19
+ import java .util .ArrayList ;
19
20
import java .util .Collections ;
21
+ import java .util .List ;
20
22
21
23
import org .gradle .api .Plugin ;
22
24
import org .gradle .api .Project ;
@@ -71,8 +73,10 @@ private void disableToolchainTasks(Project project) {
71
73
}
72
74
73
75
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 ));
76
80
}
77
81
78
82
}
You can’t perform that action at this time.
0 commit comments