Introduction to Gradle Build Tool

June 20, 2023

9:00 AM - 1:30 PM PST


Description

Introduction to Gradle Build Tool is aimed at developers and build engineers who have no previous experience with Gradle Build Tool. It is designed to give you a foundation in Gradle fundamentals. We assume you have some familiarity with software development.

Our goal is to demonstrate the building blocks necessary for you to manage your own Gradle build projects. This class is hands-on, so you will spend a significant portion of the class with your hands on the keyboard, learning by doing, working through lab exercises. By the end of this class, you will know the basics of Gradle and have a feel for how Gradle tasks and builds work.

Duration

4.5 hours training session

Audience

This class is designed for developers and build engineers who want to learn about Gradle.

Prerequisites

No prior experience with Gradle Build Tool is required.

  • Install the latest version of Gradle Build Tool along with at least Java 1.8
  • Recommended: IntelliJ community edition
  • Some experience with software development
  • Training materials use some Java and Kotlin, experience with these or similar languages is a bonus but not required

Objectives

  1. Learn core Gradle concepts and terminology
  2. Get practical experience with hands-on exercises

Course Outline

  • About Gradle Build Tool
    • Build automation concepts
    • Gradle Build Tool core concepts
    • Gradle community
  • Core concepts
    • Build configuration
      • Overview of Gradle configuration layout
      • Creating configuration using Gradle init
      • Opening in IDE
      • Gradle wrapper
      • Hands-on exercise 1
    • Build lifecycle
      • The 3 lifecycle phases
    • Plugins
      • Plugin types
      • Java plugins example
      • SourceSets
    • Tasks
      • Task categories
      • Inputs and outputs
      • Dependency and ordering
      • Task outcomes
      • Authoring custom tasks
      • Supporting command-line parameters
      • Task configuration reading
      • Custom actions in doFirst and doLast
      • Build Scan service
      • Hands-on exercise 2
    • Dependency management
      • Types of dependencies
      • Repository
      • Modules
      • Configuration of dependencies
      • Transitive dependencies
      • Module versioning
      • Dynamic and changing versions
      • Conflict resolution
      • Documenting dependencies
      • Hands-on exercise 3
  • Publishing
  • Multi-project builds
    • Structure
    • Adding subprojects
    • Sharing common configuration using buildSrc
    • Legacy allprojects and subprojects
    • Hands-on exercise 4