Hans Dockter is the founder and project lead of Gradle, an open source build system. He works as an independent consultant and as a trainer for Skills Matter, a UK based training company. Hans teaches Patterns, TDD and Domain Driven Design. In the past years he has worked as a Senior Developer for Krugle and Volkswagen. In the early days he was also a committer for the JBoss project and founded the JBoss-IDE.
Gradle - training
In this tutorial, you will become familiar with all major concepts of
Gradle and how to best use Gradle for simple as well as complex build
scenarios. 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 ...
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.
The Core of Gradle - A general purpose build system
- What is Gradle
- Some background information about the Gradle project
- Using Gradle via the command-line, the stand alone GUI and the IDE.
Gradle build scripts
- A very short introduction to Groovy
Introduction to Plugins
- 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.
Gradle and the File System
- 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's Deep API
- The mighty copy functionality.
- Archive handling
Gradle's Rich Model for Inputs and Outputs.
- Gradle's domain objects are extensible.
- How to avoid global properties with dynamic properties.
- Powerful construction rules for Tasks, Dependencies, ...
Working with Source Sets
- Gradle's autowiring of task dependencies.
- Buildable File Collections.
- Automatic validation of task properties.
- Declaring your inputs and outputs.
- Incremental Build
The Java Plugin
- What are source set's and why we love them.
- Declaring and configuring source sets.
- Using the source set API.
- The Java Plugin tasks: Clean, Javadoc, Compile, Archives
- Configuring test tasks (A truly rich API in action).
The Gradle Way
- What are task rules.
- Working with task rules.
- 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.
How to organize your Build Logic
- Configuration Injection
- Filtered Injection
- Project Dependencies
- Gradle follows your layout not vice versa.
- Task and Project paths
- Lifecycle Tasks and partial builds.
- The settings.gradle
The Gradle Wrapper
- Best practices.
- Using jars, build sources or script plugins in your build script.
- The gradle.properties
- Init scripts.
- Why and when to use the Gradle wrapper.
- Applying the wrapper to your build.
Gradle - A Better Way To Build
Gradle is an enterprise-grade build system. Gradle allows you to describe your build using a rich, extensible build language based on Groovy. It comes with build-by-convention support for Java, Groovy, Scala, OSGi, and web projects. Gradle provides exciting solutions for the big pain points that exist with current build systems. Gradle pushes declarative builds to a new level. It allows users to provide there own declarative elements and to customize the behavior of the build-in ones. Thus enabling concise, expressive and maintainable builds. All this is build on a rich, flexible imperative layer of tasks. With its Deep API Gradle allows you to hook in and customize every aspect of the build, be it configuration or execution behavior. Gradle has a particular focus on enterprise builds. It comes with many optimization strategies for building fast and yet reliable. It has a powerful support for multi-project builds and transitive dependency management. It allows to integrate with your existing Ant/Maven builds and your Ivy/Maven/Custom repositories. In this session you will first learn about the philosophy and concepts of Gradle. After that we will go through a couple of live demos to see Gradle in action. You will see how easy and elegant you can do amazing things with Gradle. The demos will span dependency management, test result analysis, code sharing, parallelizing, incremental builds, importing Ant/Maven projects and more. (Gradle has grown a lot since the last Geecon presentation. Even if you attended the last talk, this one will be for you :)).