Q:

Gradle script which invokes java program

I wrote a simple java program in Eclipse which parses a xml file and I need to write  Gradle script which receives the path to the xml file as a property and invokes the Java program. Could you guys help me with the script? I`m new to java and this is my first time working with gradle.

A:

What you need is a task of type JavaExec. See here for docs and here for a nice example.

