Software SKILLNET

Introduction to Gradle


Introduction to Gradle
Start Date28th August 2018
Course CodeSS18-43
VenueDublin
Non-member
Full Fee
€750.00
Duration2 days
LocationDublin
Provider
Network Member Subsidised Fee€550.00
  Course expired


Programme Overview

Gradle has been replacing Maven as the default build tool on the JVM. Its key improvement is that a Gradle build script is itself a program, written
in the Groovy scripting language. This makes it trivial to customise the build process.

Gradle supports all the standard tasks required of a built tool and can download libraries from existing Maven repositories. It is designed to embrace 'polyglot programming', where multiple JVM languages are used within the same project.

This course will enable developers to manage their builds with Gradle, extend the tool to shorten and simplify their deployment process and use Gradles power features to explore new forms of software development.

Who should attend

Delegates must have a good understanding of core Java concepts such as the classpath, packages, JAR files and repositories. A comprehensive introduction to
Groovy is provided as part of the course, but this assumes delegates have basic programming experience in Java (or another JVM language).

Course Content

Overview of Build Automation

• The early days of Make and Ant
• Why Maven became dominant in Java/JEE
• Problems with the Maven approach
• Why Gradle is replacing Maven


The Basics of Groovy
• Shifting from static to dynamic typing on the JVM
• Enhancements to existing Java language features
• New operators and language features (e.g. pattern matching)
• Built in support for collections and Regular Expressions
• Increased flexibility in support for Object Orientation
• Support for missing methods and meta-programming


Advanced Groovy Programming
• Declaring and using closures in Groovy scripts
• Simplifying your code by using closures with collections
• What 'this', 'owner' and 'delegate' mean in closures
• Specifying closures as inputs and outputs from methods
• Built in support for currying and partial invocation
• When and how to convert methods into closures
• Wrapping methods in closures to perform memoization


DSL's, Groovy and Gradle
• The role of Domain Specific Languages in frameworks
• The Gradle build file format as an example of a DSL
• How the Groovy syntax facilitates creating DSL's
• Idioms and best practises for crafting DSL's

Introducing Gradle
• Creating a build script for a console application
• Making the script self contained via the 'Wrapper'
• Configuring and connecting to repositories
• Managing dependencies and creating discrete scopes
• Exclusions and controlling transitive dependencies


Gradle Builds in Depth
• The lifecycle of a build within Gradle
• Creating a graph of inter-dependent tasks
• Managing the file system and source code control (VCS)
• Configuring source sets using the Java plugin
• Installing and managing additional plugins
• How the 'Gradle Daemon' reduces startup times
• Documenting your script for external use


Integrating Gradle with Other Tools
• Creating and importing Gradle projects in IntelliJ
• Advanced features for supporting Gradle in IntelliJ
• Using Gradle within Agile for Test Driven Development
• Using Gradle within Agile for Behaviour Driven Development
• Integrating other code quality and metrics tools (e.g. Checkstyle)


Advanced Uses of Gradle
• Building multi-module applications and configuring sub-projects
• Enabling use of Java, Scala, Clojure etc... within the same project
• Special considerations when using Gradle on Android projects
• Extending Gradle by creating your own plug-ins