Advanced Gradle Fundamentals for Java/JVM

Learn everything you need to apply Gradle best practices to JVM projects.


The Advanced Gradle Fundamentals training course is an extensive hands-on, 4 half-day Gradle training course for build masters and developers who are familiar with Gradle and are authoring and maintaining their builds. Participants will learn how to use the Gradle build system to substantially increase their productivity. This Gradle training class dives into the more advanced fundamental features of the Gradle build system.

Participants will spend a significant portion of the class with their hands on the keyboard, learning by doing, working through lab exercises designed to build on the presented material and explore the depths of Gradle. This class can take you from complete newcomer status to Gradle competence. Due to the in-depth treatment of the topics it is also very suitable for people who have experience working with Gradle. The class will be delivered by a Gradle Core Developer which gives you access to the deepest Gradle knowledge available. No question will remain unanswered.


4 days, with each day consisting of a 3.5-hour training session followed by 30-minute Q&A.


Once the training is complete participants will be able to:

  • Write your own Gradle plugins
  • Integrate with Ant and Maven
  • Learn about copy and archive tasks in Gradle
  • Working with a powerful file system API
  • Build migration best practices
  • Learn how to build Java applications
  • How to efficiently move away from your current build environment
  • Learn how to deal with complex build requirements
  • Learn how to deal with large multi module builds


This course assumes a good understanding of the Java language and working experience with Gradle and Groovy. If you are not experienced with Gradle or Groovy you should attend the Introduction to Gradle training class.


Experienced Gradle users are encouraged to attend the Advanced Gradle Fundamentals training.

Course Outline


  • What are Gradle plugins?
  • The role of plugins
  • Packaging and distributing plugins
  • Review of core plugins

Working with files

  • The file tasks (e.g. Copy, Sync)
  • Filtering, excluding,
  • aggregating, renaming
  • Working with CopySpecs
  • Expanding and making archives (zip, tar etc.)
  • The Gradle file APIs
  • Best practices for working with files

Ant Integration

  • Gradle compared to Ant
  • When to utilize Ant in Gradle
  • Using Ant tasks in Gradle builds
  • Importing Ant builds
  • Migrating from Ant to Gradle

Dependency Management

  • Terminology
  • Repositories, metadata and transitive dependencies
  • Dependency configurations
  • Declaring dependencies
  • Customizing dependency resolution & conflict-management
  • Publishing artifacts (Maven & Ivy)

Extending the model

  • Extending existing objects
  • Object extensions
  • Object containers & configuration rules

Task inputs & outputs

  • The power of the input/output model
  • Describing inputs and outputs
  • Incremental builds
  • Inferring task dependencies

The Java plugin

  • Source sets
  • Project conventions
  • Automated testing
  • Building JARs

Multiproject builds

  • Defining a multiproject build
  • Avoiding duplicate configuration with configuration injection
  • Inter project dependencies
  • Downstream and upstream partial builds

The build runtime

  • Extending all builds with init scripts
  • Init script locations
  • Using the Gradle wrapper
  • Customizing the Gradle distribution with init scripts