Gradle Goodness Notebook
$6.99
Minimum price
$6.99
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 October 6, 2021 with the following blog posts:

  • Add But Do Not Apply Plugin Using Plugins Block
  • Adding Task With Rule Based Model Configuration
  • Creation Rules For Rule Based Model Configuration Using Model DSL
  • Custom Plugin Repositories With Plugins DSL
  • Delegate Build And Run Actions To Gradle In IntelliJ IDEA
  • Get Model Report In Short Format
  • Getting Project Information Into Rule Based Model Configuration
  • Replacing << Operator For Tasks
  • Set Default Values With Rule Based Model Configuration
  • Show Hidden Model Objects
  • Validate Model In Rule Based Model Configuration
  • Passing Environment Variable Via Delegate Run Action In IntelliJ IDEA
  • Run Task Ignoring Up-to-date Checks
  • Check Operating System In Build Scripts
  • Skip Task When Input Empty Using @SkipWhenEmpty Annotation
  • Create Shortcut Key To Refresh Gradle Projects In IntellIJ IDEA
  • Change Local Build Cache Directory
  • Enable Build Cache For All Builds
  • Using Incremental Task Action
  • Command Line Options For Custom Tasks
  • Enable Task Based On Offline Command Line Argument
  • Generate Javadoc In HTML5
  • Rerun Incremental Tasks At Specific Intervals
  • Only Show All Tasks In A Group
  • Manage Dependency Versions With Dependency Constraints
  • Use bill of materials (BOM) As Dependency Constraints
  • Stop Build After One Failing Test
  • Replace Files In Archives
  • Setting Plugin Version From Property In Plugins Section
  • Shared Configuration With Conventions Plugin
  • Add Support For "Scratch" Files To Java Project
  • Create Properties File With WriteProperties Task
  • Enabling Preview Features For Java

The book contains the following sections:

  • Tasks
  • Configuration
  • Command line
  • 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

$21.98
Suggested Price
$16.99
Bundle Price

Table of Contents

  • About Me
  • Introduction
  • Tasks
    • Setting Default Tasks
    • Replacing << Operator For 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
    • Create Properties File With WriteProperties Task
    • Add Incremental Build Support to Tasks
    • Add Incremental Build Support to Custom Tasks with Annotations
    • Using Incremental Task Action
    • Command Line Options For Custom Tasks
    • Enable Task Based On Offline Command Line Argument
    • 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
    • Replace Files In Archives
    • Working with Live Task Collection
    • Unpacking an Archive
    • Create Checksums for Archives
    • Skip Task When Input Empty Using @SkipWhenEmpty Annotation
    • Specify Spock As Test Framework At Initialization
    • Inter-Project Artifact Dependencies
    • Adding Task With Rule Based Model Configuration
  • 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 gradle.properties File
    • Changing the Gradle User Home Directory
    • Different Ways to Set Project Properties
    • Setting Plugin Version From Property In Plugins Section
    • Shared Configuration With Conventions Plugin
    • Custom Plugin Repositories With Plugins DSL
    • Get Property Value With findProperty
    • Lazy Project Property Evaluation
    • Change Local Build Cache Directory
    • Enable Build Cache For All Builds
    • Using Objects for Version
    • Build Script Using Java Syntax
    • Check Operating System In Build Scripts
    • Creation Rules For Rule Based Model Configuration Using Model DSL
  • 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
    • Only Show All Tasks In A Group
    • Check Task Dependencies With a Dry Run
    • Skip Building Project Dependencies
    • Continue Build Even with Failed Tasks
    • Run Task Ignoring Up-to-date Checks
    • Rerun Incremental Tasks At Specific Intervals
    • Profiling Information
    • Stop Build After One Failing Test
    • 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
  • Java and Groovy
    • Set Java Version Compatibility
    • Set Java Compiler Encoding
    • Enabling Preview Features For Java
    • 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
    • Manage Dependency Versions With Dependency Constraints
    • Use bill of materials (BOM) As Dependency Constraints
    • Run Java Application From Build Script
    • Running Java Applications from External Dependency
    • Pass Java System Properties To Java Tasks
    • Add Support For "Scratch" Files To Java Project
    • 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
    • Generate Javadoc In HTML5
    • 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
    • Delegate Build And Run Actions To Gradle In IntelliJ IDEA
    • Passing Environment Variable Via Delegate Run Action In IntelliJ IDEA
    • Customize IDEA Project File Generation
    • Download Javadoc Files For Dependencies In IDE
    • Create Shortcut Key To Refresh Gradle Projects In IntellIJ IDEA
    • 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
    • Add But Do Not Apply Plugin Using Plugins Block
    • 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
    • Get Model Report In Short Format
    • Getting Project Information Into Rule Based Model Configuration
    • Set Default Values With Rule Based Model Configuration
    • Show Hidden Model Objects
    • Validate Model In Rule Based Model Configuration
    • Getting Announcements from Gradle Build
    • Automatically announce build results
    • Apply for all Gradle builds
    • Extending DSL
    • Create Objects Using DSL With Domain Object Containers
    • Using Nested Domain Object Containers
    • Distribute Custom Gradle in Our Company

The Leanpub 60-day 100% Happiness Guarantee

Within 60 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$11,234,590writing, 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