In my project I get the following error for compileTestJava task:
error: package org.junit.jupiter.params is not visible
import org.junit.jupiter.params.ParameterizedTest;
^
(package org.junit.jupiter.params is declared in module org.junit.jupiter.params, but module org.foo does not read it)
although I've explicitly disabled modules for tests with:
test {
useJUnitPlatform()
moduleOptions {
runOnClasspath = true
}
}
and I've disabled the gradle 7 inferModulePath with
java {
modularity.inferModulePath = false
}
tasks.withType(JavaCompile) {
modularity.inferModulePath = false
}
Here's an isolated simple project demonstrating the behavior: https://github.com/shutyaev/gradle-7-test-issue