Bootstrapping a Java project with Gradle, JUnit and Jenkins


Evening Samurai

Few of the things you will need to consider when initiating a Java project is the test management system you will use, how you will manage the dependencies and then the CI aspect of it. Foregoing the traditional TestNG/Maven route, I decided to try out JUnit using Gradle. The Java project itself was very basic, I needed to provide QA an automated way to reserve machines from an internal server farm and have it somewhat configurable in Jenkins.

Installing Gradle

On a Mac, you can easily install gradle using homebrew

brew install gradle
gradle -v


------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: Monday, January 28, 2013 3:42:46 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_17 (Oracle Corporation 23.7-b01)
OS: Mac OS X 10.8.2 x86_64

Using Gradle

Out of the box, gradle supports differents tasks and you can view them by…

View original post 506 more words