Showing posts with label Gradle. Show all posts
Showing posts with label Gradle. Show all posts

Saturday, November 30, 2013

Some Interesting gradle commands.

once the gradle is installed, now it is time to explore the functionalities of the gradle.


1. generating new java project with gradle.

   it is possible to generate simple java project with maven as follows.
 
   maven
   mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart

  the gradle also supported to generate project as follows.

  gradle
  gradle init --type java-library


2. converting the maven project to gradle.

it is possible to convert the maven project to gradle without any problem. it will create the build.gradle file and declare all the dependencies and other plugins declared in the pom.xml into the build.gradle file. In order to convert the maven project to gradle, you need to execute the following command  from the same directory of the project where the pom.xml file is located.

 gradle init



Hope this will helpful for you!

Thanks
Chathuranga Tennakoon
chathuranga.t@gmail.com
http://www.chathurangaonline.com







Thursday, November 28, 2013

How to install Gradle on Linux (Ubuntu)

if you dont know gradle, please go though the following website to get an understanding about gradle.

Gradle project home page :- http://www.gradle.org


follow the steps give below to install the gradle on your develop environment. (Linux based)

1. download the gradle distribution from the gradle website.

    http://www.gradle.org/downloads


2. extract the downloaded gradle distribution in any directory in your PC.

 
3. then add the GRADLE_HOME environmental variable. to add the environmental variable, follow the below instructions.

    3.1 sudo  gedit .bashrc
 
    3.2  add the following to the bottom of the .bashrc file

    GRADLE_HOME=<path to gradle bin file>  (e.g. /opt/gradle/gradle-1.5/bin )
    export GRADLE_HOME
    PATH=$PATH:$GRADLE_HOME
    export PATH
  
    3.2  source .bashrc



4. once the above changes are done, run gradle in the terminal to check whether gradle is properly installed.




Thanks
Chathuranga Tennakoon
chathuranga.t@gmail.com
http://www.chathurangaonline.com