How to refer or link the Java src with test structure in Gradle

Hi All

I’m new to gradle currently I’m facing a problem while compiling test classes I’m referring the Java Classes in Test Classes to test program but I couldn’t compile. Problem I wouldn’t understand to how to link or
refer Java src structure with test structure. Could somebody help me how to resolve the issues.

In Stackoverflow I have given a detailed explanation. Below I have the link for reference.

Issue Link