Gradle in Action
Benjamin Muschko
Foreword by Hans Dockter
  • February 2014
  • ISBN 9781617291302
  • 480 pages
  • printed in black & white

The authoritative guide.

From the Foreword by Hans Dockter, Founder of Gradle and Gradleware

Gradle in Action is a comprehensive guide to end-to-end project automation with Gradle. Starting with the basics, this practical, easy-to-read book discusses how to build a full-fledged, real-world project. Along the way, it touches on advanced topics like testing, continuous integration, and monitoring code quality. You'll also explore tasks like setting up your target environment and deploying your software.

About the Technology

Gradle is a general-purpose build automation tool. It extends the usage patterns established by its forerunners Ant and Maven and allows builds that are expressive, maintainable, and easy to understand. Using a flexible Groovy-based DSL, Gradle provides declarative and extendable language elements that let you model your project's needs the way you want.

Table of Contents detailed table of contents




about this book

about the cover illustration

Part 1 Introducing Gradle

1. Introduction to project automation

1.1. Life without project automation

1.2. Benefits of project automation

1.3. Types of project automation

1.4. Build tools

1.5. Java build tools

1.6. Summary

2. Next-generation builds with Gradle

2.1. Why Gradle? Why now?

2.2. Gradle’s compelling feature set

2.3. The bigger picture: continuous delivery

2.4. Installing Gradle

2.5. Getting started with Gradle

2.6. Using the Command line

2.7. Summary

3. Building a Gradle project by example

3.1. Introducing the case study

3.2. Building a Java project

3.3. Web development with Gradle

3.4. Gradle wrapper

3.5. Summary

Part 2 Mastering the fundamentals

4. Build script essentials

4.1. Building blocks

4.2. Working with tasks

4.3. Hooking into the build lifecycle

4.4. Summary

5. Dependency management

5.1. A quick overview of dependency management

5.2. Learning dependency management by example

5.3. Dependency configurations

5.4. Declaring dependencies

5.5. Using and configuring repositories

5.6. Understanding the local dependency cache

5.7. Troubleshooting dependency problems

5.8. Summary

6. Multiproject builds

6.1. Modularizing a project

6.2. Assembling a multiproject build

6.3. Configuring subprojects

6.4. Individual project files

6.5. Customizing projects

6.6. Summary

7. Testing with Gradle

7.1. Automated testing

7.2. Testing Java applications

7.3. Unit testing

7.4. Configuring test execution

7.5. Integration testing

7.6. Functional testing

7.7. Summary

8. Extending Gradle

8.1. Introducing the plugin case study

8.2. From zero to plugin

8.3. Writing a script plugin

8.4. Writing custom task classes

8.5. Using and building object plugins

8.6. Summary

9. Integration and migration

9.1. Ant and Gradle

9.2. Maven and Gradle

9.3. Comparing builds

9.4. Summary

Part 3 From build to deployment

10. IDE support and tooling

10.1. Using IDE plugins to generate project files

10.3. Embedding Gradle with the tooling API

10.4. Summary

11. Building polyglot projects

11.1. Managing JavaScript with Gradle

11.2. Building polyglot, JVM-based projects

11.3. Other languages

11.4. Summary

12. Code quality management and monitoring

12.1. Integrating code analysis into your build

12.2. Measuring code coverage

12.3. Performing static code analysis

12.4. Integrating with Sonar

12.5. Summary

13. Continuous integration

13.1. Benefits of continuous integration

13.2. Setting up Git

13.3. Building a project with Jenkins

13.4. Exploring cloud-based solutions

13.5. Modeling a build pipeline with Jenkins

13.6. Summary

14. Artifact assembly and publishing

14.1. Building artifacts and distributions

14.2. Publishing artifacts to a binary repository

14.3. Publishing to a public binary repository

14.4. Artifact assembly and publishing as part of the build pipeline

14.5. Summary

15. Infrastructure provisioning and deployment

15.1. Infrastructure provisioning

15.2. Targeting a deployment environment

15.3. Automated deployments

15.4. Deployment tests

15.5. Deployment as part of the build pipeline

15.6. Summary

Appendix A: Driving the command line

Appendix B: Groovy for Gradle users


What's inside

  • A comprehensive guide to Gradle
  • Practical, real-world examples
  • Transitioning from Ant and Maven
  • In-depth plugin development
  • Continuous delivery with Gradle

About the reader

The book assumes a basic background in Java, but no knowledge of Groovy.

About the author

Benjamin Muschko is a member of the Gradleware engineering team and the author of several popular Gradle plugins.

placing your order...

Don't refresh or navigate away from the page.
print book $26.99 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
Prints and ships within 3-5 days
Gradle in Action (print book) added to cart
continue shopping
go to cart

eBook $28.79 $35.99 3 formats + liveBook
Gradle in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks