Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
6179b997
Commit
6179b997
authored
May 14, 2021
by
dreis2211
Committed by
Andy Wilkinson
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove add-opens workaround in ToolchainPlugin
See gh-26465
parent
e3f36ee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
ToolchainPlugin.java
...springframework/boot/build/toolchain/ToolchainPlugin.java
+2
-13
No files found.
buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java
View file @
6179b997
...
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
build
.
toolchain
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
...
...
@@ -58,8 +57,7 @@ public class ToolchainPlugin implements Plugin<Project> {
JavaToolchainSpec
toolchainSpec
=
project
.
getExtensions
().
getByType
(
JavaPluginExtension
.
class
)
.
getToolchain
();
toolchainSpec
.
getLanguageVersion
().
set
(
toolchain
.
getJavaVersion
());
configureJavaCompileToolchain
(
project
,
toolchain
);
configureTestToolchain
(
project
,
toolchain
);
configureTestToolchain
(
project
);
}
}
...
...
@@ -75,16 +73,7 @@ public class ToolchainPlugin implements Plugin<Project> {
project
.
getTasks
().
withType
(
GradleBuild
.
class
,
(
task
)
->
task
.
setEnabled
(
false
));
}
private
void
configureJavaCompileToolchain
(
Project
project
,
ToolchainExtension
toolchain
)
{
project
.
getTasks
().
withType
(
JavaCompile
.
class
,
(
compile
)
->
{
compile
.
getOptions
().
setFork
(
true
);
// See https://github.com/gradle/gradle/issues/15538
List
<
String
>
forkArgs
=
Arrays
.
asList
(
"--add-opens"
,
"jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"
);
compile
.
getOptions
().
getForkOptions
().
getJvmArgs
().
addAll
(
forkArgs
);
});
}
private
void
configureTestToolchain
(
Project
project
,
ToolchainExtension
toolchain
)
{
private
void
configureTestToolchain
(
Project
project
)
{
project
.
getTasks
().
withType
(
Test
.
class
,
(
test
)
->
{
List
<
String
>
arguments
=
Collections
.
singletonList
(
"--illegal-access=warn"
);
test
.
jvmArgs
(
arguments
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment