Introduction to Gradle
Get hands-on training on all the Gradle fundamental features in less than one day.
Introduction to Gradle is aimed at developers and build masters who have no previous experience with Gradle. It is designed to give you a foundation in Gradle fundamentals. We assume you have some familiarity with the Java programming language and some experience with automated builds.
Our goal is to demonstrate the building blocks necessary for you to author your own build scripts. 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 build scripts work.
The exercises in Introduction to Gradle are based around building an example application using Java and C++. The class will be delivered by a Gradle Core Developer, which gives you an opportunity to ask questions to someone with the deepest Gradle knowledge available.
2 days, with each day consisting of a 3.5-hour training session followed by 30-minute Q&A.
This class is designed for developers and build masters who want to learn about Gradle.
This class assumes some familiarity with the Java language (or a similar language) and automated builds. No prior experience with Gradle is required.
With this class, you will
- Gain the basic understanding you need to get your Gradle build up and running.
- Build a Java application.
- Build a C++ application and library.
- Learn a few Gradle best practices.
- Get to ask questions to a Gradle Core Developer!
We recommend that you continue to learn more through one of our advanced Gradle learning courses.
- About Gradle
- Gradle Documentation and Resources
- Groovy Documentation and Resources
- Gradle Best Practices
- Using the Gradle Wrapper
- Gradle Daemon and command line options
- Lab: Invoking Gradle
- Lab: A look at the class project
Gradle Building Blocks
- Gradle Build Scripts
- Defining Tasks
- Executing Tasks
- Built-in Tasks
- Build Lifecycle
- Incremental builds and working with files
- Working with Archives
- Lab: Exercises with Gradle basics
- Source layout conventions
- Tasks added by the Java plugin
- Built-in support for JUnit/TestNG tests
- Lab: Exercises with the Java Plugin
- Software Component Model
- Source layout conventions
- Tasks added by the C++ plugin
- Lab: Exercises with the C++ Plugin
Dependency Management Basics
- Defining repositories
- Defining dependencies
- Transitive dependencies
- Excluding troublesome dependencies
- Forcing the use of particular versions
- Dynamic/changing dependencies
- Publishing artifacts
- Lab: Exercises with dependencies and repositories
- Defining a multi-project build
- Configuration injection
- Project dependencies and partial builds
- Where to get more help
- Latest Gradle Features
- Built-in Plugins
- Community Plugins