Gradle

CloudLabs

Projects

Assignment

24x7 Support

Lifetime Access

.

Course Overview

Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else. Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Powered by a Groovy DSL and packed with innovation, Gradle provides a declarative way to describe all kinds of builds through sensible defaults. Gradle is quickly becoming the build system of choice for many open source projects, leading edge enterprises and legacy automation challenges.

At the end of the training, participants will be able to:

Pre-requisite

Good understanding of the Java language

Duarion

5 days

Course Outline

  • 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
  • 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.
  • How do Gradle plugins work.
  • The different ways of applying plugins to your build.
  • Writing your own plugin.
  • A short overview of available plugins.
  1. The mighty copy functionality.
  2. Archive handling
  3. Custom Gradle file types: FileTree and FileCollection
  • The relationship between Ant and Gradle.
  • Using Ant tasks.
  • Deep import of Ant projects.
  • Overview.
  • Accessing Maven and Ivy repositories.
  • Transitive dependency handling.
  • Using repository-less dependencies.
  • Publishing artifacts.
  • Pom generation and customization.
  • Publishing to a Maven repository.
  • The Maven2Gradle converter.
  • Gradle’s domain objects are extensible.
  • How to avoid global properties with dynamic properties.
  • Powerful construction rules for Tasks, Dependencies, ..
  • Gradle’s autowiring of task dependencies.
  • Buildable File Collections.
  • Automatic validation of task properties.
  • Declaring your inputs and outputs.
  • Incremental Build
  • 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.
  • Task Rules
  • 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.
  • 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
  • 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.

Reviews