I have a gradle project that generates a jar ( myFoo.jar ) in the build/libs folder. I have a few JUnit test that tests the classes from the myFoo.jar. The JUnits runs fine, except for the fact that when running the tests, the tests runs with bin/ in the classpath and the class loader is not really loading the build/libs/myFoo.jar. The tests instead run with bin/ in the classpath. So the JUnits passes except for a few.
One of my tests verifies some of the files under the resource folder in the jar, and these tests are failing with the ‘test’ task is run.
Is there any way for the gradle test task remove the bin/ from the classpath and instead include build/libs/myFoo.jar ?