I have a project that pulls in a shaded jar that contains guava (and without relocating the guava classes to a package of their own). When running gradle test I get an exception
java.lang.NoClassDefFoundError: Could not initialize class org.gradle.internal.SystemProperties
This class uses the of() method in a static initialization. I guess the duplicate guava classes have different classloaders causing the problem. Is there any way to solve this? Perhaps some way of untangling the gradle classpath and my own classpath? Spawning the tests in their own VM?