Gradle configuration for eclipse project

I have J2ee project developed using eclipse and i have build.xml to create war file and to deploy in local tomcat. But i like replace by build.xml file using gradle with out changing my folder structure. I tried to compile my .java class but failed in all by try. Please help me to compile by .java and creating war on existing folder structure.

My build.xml is below :

<property name=“


<property name=“des.classes.dir”


<property name=“local.deploy”


<property name=“des.logs.dir”


<property name=“”


<property name=“des.persistantDB”

value=“Global_Src” />

You can reconfigure the conventional source sets provided by the Java plugin to look for your sources in a different directory than ‘src/main/java’. Here’s an example listing. You can read up on source sets in the Java plugin documentation. You didn’t post your ‘build.xml’ so I am not sure what you are referring to.