Here you can find project-based tutorials and topical guides to help you learn Gradle through using it. Whether you are new to Gradle or an experienced build master, the guides hosted here are designed to help you accomplish your goals.
Getting Started
Step-by-step lessons on how to use Gradle, both in general and for specific tasks.
Creating Build Scans
Learn how to enable build scans for a Gradle build. Add the plugin and the license agreement, execute a scan, and view the results. Add build scan capabilities for all builds using an init script.
8 mins
Creating a New Gradle Build
Learn Gradle tasks that work on any project, regardless of type. See what tasks are available, generate a wrapper, copy data from one location to another, add a plugin, and more.
12 mins
Creating Multi-project Builds
Get started with multi-project builds by developing an application that includes both libraries and documentation.
26 mins
Building Java Libraries
Use the Build Init plugin to create a Java project, build it, run tests and view the test report, generate API docs, and customize the deliverable jar.
14 mins
Building Groovy Libraries
Use the Build Init plugin to create a Groovy project, build it, run tests and view the test report, and generate API docs.
8 mins
Building Kotlin JVM Libraries
Write a simple library in Kotlin, test it with JUnit, generate API docs with Dokka, and publish it using Gradle's Kotlin DSL of course.
15 mins
Building Scala Libraries
Use the Build Init plugin to create a Scala project, build it, run tests and view the test report, and generate the API docs.
8 mins
Building Java Applications
Use the Build Init plugin to create a client-side Java application with a dependency. Use the Application plugin to configure an executable jar. Build the project, run tests and view the test report, then execute the project as a command-line application.
10 mins
Building Java Web Applications
Create a simple web application that uses the Java, WAR, and Gretty plugins. Deploy the application using Gretty. Test it using Mockito and Selenium, all coordinated by Gradle.
21 mins
Building Spring Boot 2 Applications with Gradle
Build and run a simple Spring Boot 2 application using Gradle's built-in BOM support.
13 mins
Consuming JVM Libraries
Learn how to consume external JVM artifacts by building a small Java application.
12 mins
Building C++ Applications
Create a project for C++ language files. Add a C++ source file and header. Use Gradle to generate a command-line application. Run the application and view the results, along with the output of the compiler and linker.
13 mins
Building C++ Libraries
Create a project for C++ libraries. Add a C++ source file and header. Use Gradle to generate static-linkable and dynamic linkable libraries. View the outputs of the compiler and linker.
11 mins
Executing Gradle Builds on Jenkins
Learn how to configure and execute Gradle builds on Jenkins.
6 mins
Executing Gradle Builds on TeamCity
Learn how to configure and execute Gradle builds on TeamCity.
7 mins
Executing Gradle Builds on Travis CI
Learn how to configure and execute Gradle builds on Travis CI.
5 mins
Running Webpack with Gradle
Define a Gradle task to bundle web assets with Webpack in a way that leverages Gradle's up-to-date checks and build cache. Demonstrate the caching behavior and incremental build capabilities.
11 mins
Writing Custom Gradle Tasks
Learn how to write your own Gradle tasks, both using the built-in DSL and by creating your own task class that can be reused in the build.
9 mins
Writing Gradle Plugins
Write a simple Gradle plugin by implementing the proper interface and creating a custom task class to support it. Create a plugin identifier. Use the new plugin in a project.
12 mins
Publishing Plugins to Gradle Plugin Portal
Learn how to publish your own plugins to the free Gradle Plugin Portal. After registering, add your generated keys to your own Gradle properties. Use the publishing plugin with the necessary metadata to publish the results.
16 mins
Topical
In-depth advice from the experts on specific topics of interest.
Designing Gradle Plugins
Properly design Gradle plugins based on established practices, and apply them to your own projects. Focuses on technologies and techniques that support good performance and easy maintenance.
15 mins
Implementing Gradle Plugins
Create a Gradle plugin using custom task types, incremental build support, and recommendations for configuration choices.
40 mins
Testing Gradle Plugins
Learn how to effectively test plugins in a manual and automated fashion. Demonstrates the use of composite builds, popular JVM-based test frameworks and Gradle TestKit.
26 mins
Using the Worker API
Learn how to use the Worker API to enable fine-grained parallelism and isolation for your custom tasks. This guide will walk you through the process of converting an existing custom task to use the Worker API.
27 mins
Optimizing Gradle Build Performance
Improve the performance of your build using build scans, dependency resolution strategies, parallel execution, incremental and partial builds, and more. Includes specific recommendations for Java and Android projects.
50 mins
Using the Build Cache
Learn the details of the Gradle build cache to improve performance. Includes solutions for common problems, debugging and diagnosing cache misses, sharing with other developers, and more.
102 mins
Migrating build logic from Groovy to Kotlin
Learn how to migrate your build logic from Groovy to Kotlin using the Gradle Kotlin DSL. Discover pain points and discuss migration strategies. Includes solutions for common problems and interoperability recipes.
31 mins
Tutorials
Similar to tutorials for getting started, but with greater depth.
Building Java 9 Modules
How to modify the tasks added by the regular java-library and application plugins to get them work on with Java 9 modules.
39 mins
How to Contribute
Want to contribute your own guide? Here's how
Writing a Getting Started Guide
See how to create your own Gradle Guide. Create a GitHub issue, fork and clone the repository, write your guide and render it locally, submit a pull request, and see your new guide hosted on the Guides site.
13 mins
Style Guide
Reference for authoring new guides. Includes recommended style, use of languages and supportive Gradle tasks for authors.
28 mins