I had a case where i need to run gradle tests using the jar file listed in the specific directory.
In build.gradle, i have the below code which will create a build directory with classes and the tests run using those classes.
Our build code is deployed onto a different machine so i want to run the tests using the jar file.
Tried adding the classpath to jar file in the test task but the tests are looking into the build directory from the sourceSets. Is there a way i can remove the sourceSets and use the jar file to run the tests?
classpath = files(’$STAGE/build/test/libs/*.jar’)