Friday, 5 August 2016

First Gradle project | IntellJ

Gradle is one more tool for build management besides ANT, Maven etc.

Below are the steps to configure for the first time.


Download and Configuration:

Gradle is downloadable as a zip file at http://www.gradle.org/downloads.

Only the binaries are required, so look for the link to gradle-version-bin.zip.

Unzip the file to your computer, and add the bin folder to your path.



Testing:

From the command-line:

> gradle

You will get ‘BUILD SUCCESSFUL’

If you are still not able to see ‘Gradle’ option in Intellij


Run below command.

>gardle init




First Gradle project:

Open IntelliJ idea – File – New – Project



Choose Gradle from left panel and select Java Checkbox.

Key in GroupId and ArtifactID.



Select below 3 options for easy configuration:

-          -Use Auto Import
-         - Create Directories for empty content roots automatically
-         - Use local gradle distribution




Choose appropriate project name and location.

Click on FINISH button.

Takes few minutes to create initial gradle project.







If you see any issues reg importing gradle dependencies,

File - settings - Build,Execution,Deployment - Gradle - Uncheck 'offline work'



Thats all.





No comments:

Post a Comment