Expert Training
Our intensive courses equip your development team with advanced know-how of Gradle-based project automation—all through small, informative hands-on classes.
Overview
In this intensive and highly practical 2-day Gradle course, you will become familiar with all major concepts of Gradle and how to best use Gradle for simple as well as complex build scenarios. This course is packed with hands-on exercises. You will learn about the basic language elements of the Gradle Domain Specific Language (DSL), how to use Gradle's build-by-convention for plain Java and Java web projects, and how to use the Gradle plugin system. You will find out how easy it is to customize your build. You will learn about Gradle's mighty dependency management. And much more ...
Course Prerequisites
This course assumes a good understanding of the Java language. Some code is initially easier to understand if you also have a basic understanding of the Groovy language. But due to Groovy's similarity to Java, Groovy is not a prerequisite. There will be a very short introduction to Groovy at the beginning of the course.
Course Program
Gradle Introduction
- What is Gradle
- Some background information about the Gradle project
- Installing Gradle
- Using Gradle via the command-line, the stand alone GUI and the IDE.
- Gradle build scripts
- A very short introduction to Groovy
The Core of Gradle - A general purpose build system
- Background: Directed Acyclic Graphs (DAG) - The heart of (almost) every build system.
- How to work with Gradle tasks
- How to create custom task types.
- Task Dependencies
- Smart merging when executing multiple tasks.
- Smart exclusion.
- How to access and work with the DAG.
- Hooking into the Gradle build lifecycle.
- Using the Gradle logging infrastructure.
Introduction to Plugins
- How do Gradle plugins work.
- The different ways of applying plugins to your build.
- Writing your own plugin.
- A short overview of available plugins.
Gradle and the File System
- The mighty copy functionality.
- Archive handling
- Custom Gradle file types: FileTree and FileCollection
Using Ant from Gradle
- The relationship between Ant and Gradle.
- Using Ant tasks.
- Deep import of Ant projects.
Dependency Management
- Overview.
- Accessing Maven and Ivy repositories.
- Transitive dependency handling.
- Using repository-less dependencies.
- Publishing artifacts.
Maven Integration
- Pom generation and customization.
- Publishing to a Maven repository.
- The Maven2Gradle converter.
Gradle's Deep API
- Gradle's domain objects are extensible.
- How to avoid global properties with dynamic properties.
- Powerful construction rules for Tasks, Dependencies, ...
Gradle's Rich Model for Inputs and Outputs.
- Gradle's autowiring of task dependencies.
- Buildable File Collections.
- Automatic validation of task properties.
- Declaring your inputs and outputs.
- Incremental Build
Working with Source Sets
- What are source set's and why we love them.
- Declaring and configuring source sets.
- Using the source set API.
The Java Plugin
- The Java Plugin tasks: Clean, Javadoc, Compile, Archives
- Configuring test tasks (A truly rich API in action).
Task Rules
- What are task rules.
- Working with task rules.
The Gradle Way
- The declarative nature of Gradle.
- Avoiding rigidity.
- Providing a build language vs. being a framework.
- All requirements are equal: Custom declarative elements.
- XML, Groovy and putting lipstick on a pig.
Multi-Project Builds
- Configuration Injection
- Filtered Injection
- Project Dependencies
- Gradle follows your layout not vice versa.
- Task and Project paths
- Lifecycle Tasks and partial builds.
- Reports
- The settings.gradle
How to organize your Build Logic
- Best practices.
- Using jars, build sources or script plugins in your build script.
- The gradle.properties
- Init scripts.
The Gradle Wrapper
- Why and when to use the Gradle wrapper.
- Applying the wrapper to your build.
Interested in signing up?
Get in Touch!