I am running the automation test Project in Gradle and I need to call one Java Program for the Report Generation at the end of the test completion .So, I have created one task to execute the Java program as per (Gradle to execute Java class (without modifying build.gradle)).
Gradle Task:
task reportGenerator(type:JavaExec){
classpath = sourceSets.main.runtimeClasspath
main = "util.Result_Generator"
}
But unfortunately , I am getting an error as Error: Could not find or load main class util.Result_Generator
I have validated Java Environment Variable and it is also correct. Could you please help me to solve?