Search This Blog

Saturday, September 26, 2015

Gradle , how to start ?



Download Gradle
https://gradle.org/gradle-download/




Configure environment entries
add GRADLE_HOME/bin --> path ,where GRADLE_HOME is gradle installation folder.


Reboot


Check by typing gradle -v to see if it installed correctly


Now create an eclipse project with source attached below






package main.java.hello;



public class Greeter {

public String sayHello() {

return "Hello world!";


}

}




////


package main.java.hello;

public class HelloWorld {

public static void main(String[] args) {

Greeter greeter = new Greeter();

System.out.println(greeter.sayHello());




}


}


//////////////


Once done make a file called build.gradle in root folder of your project.




content of build.gradle

apply plugin: 'java'











go to command prompt and rungradle build





Gradle working fine on your system




No comments:

Post a Comment