Book Image

Learning Continuous Integration with TeamCity

Book Image

Learning Continuous Integration with TeamCity

Overview of this book

Table of Contents (19 chapters)
Learning Continuous Integration with TeamCity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using Gradle with TeamCity


Gradle is a newer build and deployment automation tool for Java projects. It comes with a rich Domain Specific Language (DSL), based on Groovy, to write our build scripts and also to extend Gradle itself.

Installing Gradle

Installing Gradle is similar to installing Ant and Maven. We download the binary distribution, unpack it, and add the bin to the PATH. The commands to install Gradle are as follows:

wget http://services.gradle.org/distributions/gradle-1.10-bin.zip
unzip gradle-1.10-bin.zip
export GRADLE_HOME=/usr/local/gradle-1.10
export PATH=$GRADLE_HOME/bin:$PATH
gradle -v

Tip

Gradle can also be installed using a package manager on your OS of choice. For example, on Windows, if you are using Chocolatey, Gradle can be simply installed using cinst gradle.

Building with Gradle on TeamCity

The basic concepts involved in getting a simple build running with Gradle are very similar to those of Ant and Maven. The Gradle build file is usually called build.gradle, and builds...