I have a simple Groovy test class using JUnit
class GroovyJunitTest {
@Test
void test() {
println this.class.getClassLoader().toString()
}
}
This prints out
sun.misc.Launcher$AppClassLoader@4e25154f
which means that Java classloader is used.
I run the test with both Intellij IDE and using gradle test. The same result is in both cases.
Is there a way to configure JUnit to use Groovy classloader?