Gradle Goodness Notebook
Minimum price
Suggested price

Gradle Goodness Notebook

Experience Gradle through code snippets

About the Book

In 2009 I started to write small blog posts about Gradle at Messages from mrhaki. The posts contained code samples of cool Gradle features I just didn't want to forget. The blog posts turned out to be a useful resource for people learning and using Groovy in their every day programming.

The Gradle Goodness Notebook contains the blog posts about Gradle previously mentioned on my blog. The posts have been edited slightly so they can be used for the book. The book gives a broad overview of all the great features we can find in the Gradle build tool.

Latest update on January 31st 2016 with the following blog posts:

  • Quickly Open Test Report in IntelliJ IDEA
  • Getting More Help For a Task
  • Pass Java System Properties To Java Tasks
  • Download Javadoc Files For Dependencies In IDE
  • Setting Global Properties For All Gradle Builds
  • Apply External Script With Plugin Configured Through Buildscript
  • Getting Information About Buildscript Dependencies

The book contains the following sections:

  • Command line
  • Configuration
  • Tasks
  • Java and Groovy
  • Miscellaneous

About the Author

Hubert Klein Ikkink
Hubert A. Klein Ikkink (mrhaki)

Hello. I am a passionate Groovy and Java developer based in Tilburg, The Netherlands. My goal is to write software, like Pixar makes movies, BMW makes cars, Bang & Olufsen makes audio and TV systems and Apple makes computers and devices: clean, elegant, user-centered and high quality.

My name is Hubert A. Klein Ikkink. Not a very common name, right? To make things easier I just picked the first letters of my firstname and surname and came up with haki. So there you have it, now I am known as Mr. Haki or mrhaki for short.

In 2009 I started writing blog posts about Gradle with the name Gradle Goodness. These posts contain small snippets of code explaining core and exotic features of the Gradle build tool.

Bundles that include this book

Suggested Price
Bundle Price

Table of Contents

  • About Me
  • Introduction
  • Command line
    • Execute Tasks with Abbreviations
    • Pass Command-line Arguments to Build Script
    • Run a Build Script With a Different Name
    • Excluding Tasks for Execution
    • Display Available Tasks
    • Getting More Help For a Task
    • Using Continuous Build Feature
    • Check Task Dependencies With a Dry Run
    • Skip Building Project Dependencies
    • Continue Build Even with Failed Tasks
    • Profiling Information
    • Use gradlew for Easy Gradle Execution
    • Change Gradle Wrapper Script Name
    • Specify Wrapper Version and Distribution Type From Command Line
    • Check The Gradle Daemon Status
  • Configuration
    • Changing the Project Name
    • Changing Name of Default Build File
    • Display Gradle Information in the Build
    • Setting Global Properties For All Gradle Builds
    • Using Properties for Multiple Environments or Profiles
    • Define System Properties in File
    • Changing the Gradle User Home Directory
    • Different Ways to Set Project Properties
    • Get Property Value With findProperty
    • Lazy Project Property Evaluation
    • Using Objects for Version
    • Build Script Using Java Syntax
  • Tasks
    • Setting Default Tasks
    • Using Optional Ant Task in Gradle
    • Get User Input Values From Console
    • Group Similar Tasks
    • Adding Tasks to a Predefined Group
    • Getting Information About Buildscript Dependencies
    • Add Incremental Build Support to Tasks
    • Add Incremental Build Support to Custom Tasks with Annotations
    • Set Task Values with Project Convention
    • Methods Generated For Setting Task Properties
    • Lazy Task Properties
    • Adding Custom Extension To Tasks
    • Use Command Line Options With Custom Tasks
    • Automatic Clean Tasks
    • Parse Files with SimpleTemplateEngine in Copy Task
    • Copy Files with Filtering
    • Renaming Files while Copying
    • Using CopySpec with Tasks
    • Handle Copying Duplicate Files
    • Working with Live Task Collection
    • Unpacking an Archive
    • Create Checksums for Archives
    • Specify Spock As Test Framework At Initialization
    • Inter-Project Artifact Dependencies
  • Java and Groovy
    • Set Java Version Compatibility
    • Set Java Compiler Encoding
    • Using Gradle for a Mixed Java and Groovy Project
    • A Groovy Multi-project with Gradle
    • Shortcut Notation for Dependencies
    • Display Dependencies for a Gradle Build
    • Getting More Dependency Insight
    • Exclude Transitive Dependency from All Configurations
    • Adding Dependencies Only for Packaging to War
    • Run Java Application From Build Script
    • Running Java Applications from External Dependency
    • Pass Java System Properties To Java Tasks
    • Running Groovy Scripts as Application
    • Alter Start Scripts from Application Plugin
    • Running Groovy Scripts Like From Groovy Command Line
    • Running a Single Test
    • Running Tests in Parallel
    • Running All Tests From One Package
    • Show Standard Out or Error Output from Tests
    • Show More Information About Failed Tests
    • Create JAR Artifact with Test Code for Java Project
    • Add Filtering to ProcessResources Tasks
    • Use Groovy Ruleset File with Code Quality Plugin
    • Don’t Let CodeNarc Violations Fail the Build
  • IDE
    • Customize IDEA Project File Generation
    • Download Javadoc Files For Dependencies In IDE
    • Quickly Open Test Report in IntelliJ IDEA
    • Add Spring Facet To IntelliJ IDEA Module
    • Configure IntelliJ IDEA To Use Gradle As Testrunner
    • Enable Compiler Annotation Processing For IntelliJ IDEA
    • Set VCS For IntelliJ IDEA In Build File
    • Source Sets As IntelliJ IDEA Modules
  • Miscellaneous
    • Parse Output from Exec Invocation
    • Define A Short Plugin Id For Custom Plugins
    • Base Plugin Usage
    • Apply External Script With Plugin Configured Through Buildscript
    • Init Script for Adding Extra Plugins to Existing Projects
    • Alter Start Scripts from Application Plugin
    • Set a Project Description
    • Using and Working with Gradle Version
    • Rename Ant Task Names When Importing Ant Build File
    • Use Git Commit Id in Build Script
    • Getting Announcements from Gradle Build
    • Extending DSL
    • Create Objects Using DSL With Domain Object Containers
    • Using Nested Domain Object Containers
    • Distribute Custom Gradle in Our Company

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Do Well. Do Good.

Authors have earned$10,795,682writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF, EPUB and/or MOBI files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub