Graddle basics

 

What is Graddle ?

 

Graddle is build tool that can be used for Java/Scala.

Graddle provides features such as compiling the code, running unit tests, building jars etc using its Java plugin.

 

Graddle plugins:

 

To use the java plugin add the following file to your build file build.gradle:

apply plugin : 'java'

 

Gradle provides below plugins for web application development:

War plugin and the Jetty plugin.

The War plugin extends the Java plugin to build a WAR file for your project.

apply plugin: 'war'

 

The Jetty plugin extends the War plugin to allow you to deploy your web application to an embedded Jetty web container.

apply plugin: 'jetty'

 

To create eclipse project, apply eclipse plugin.

apply plugin: 'eclipse'

 

 

Graddle tasks :

 

graddle build -> build the project

graddle clean -> clean build directory

graddle assemble -> complile and create jar/war

graddle check -> compile and test code

 

 

Jar file dependencies:

 

Jar dependencies can be provided using repositories :

repositories {
mavenCentral()
}

 

 

 

© 2015, https:. All rights reserved. On republishing this post, you must provide link to original post

Leave a Reply.. code can be added in <code> </code> tags