Skip to content

Commit 3ddf663

Browse files
ZacSweerstschuchortdev
authored andcommitted
Fix JDK 16+ recommendations
illegal-access argument will not work in JDK 17 or higher and result in an error, this also adds missing `parser` and `code` subpackages
1 parent 65d0f51 commit 3ddf663

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,18 @@ To mitigate this problem, you have to add the following code to your module's `b
173173
```
174174
if (JavaVersion.current() >= JavaVersion.VERSION_16) {
175175
test {
176-
jvmArgs = [
177-
"--illegal-access=permit",
178-
"--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
179-
"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
180-
"--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
181-
"--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED",
182-
"--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
183-
"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
184-
"--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
185-
"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
186-
]
176+
jvmArgs(
177+
"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
178+
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
179+
"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
180+
"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
181+
"--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED",
182+
"--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
183+
"--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
184+
"--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
185+
"--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
186+
"--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
187+
)
187188
}
188189
}
189190
```

0 commit comments

Comments
 (0)