You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ With the release of Java 16 the access control of the new Jigsaw module system i
174
174
java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x43b6aa9d) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x43b6aa9d
175
175
```
176
176
To mitigate this problem, you have to add the following code to your module's `build.gradle` file:
177
-
```
177
+
```groovy
178
178
if (JavaVersion.current() >= JavaVersion.VERSION_16) {
179
179
test {
180
180
jvmArgs(
@@ -192,6 +192,27 @@ if (JavaVersion.current() >= JavaVersion.VERSION_16) {
192
192
}
193
193
}
194
194
```
195
+
196
+
or for Kotlin DSL
197
+
198
+
```kotlin
199
+
if (JavaVersion.current() >=JavaVersion.VERSION_16) {
Since the kotlin compilation tests run in the same process as the test runner, these options have to be added manually and can not be set automatically by the kotlin-compile-testing library.
0 commit comments