Gradle Guides
Here you can find project-based 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.
Get started with multi-project builds by developing an application that includes two library subprojects.
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.
Use the Build Init plugin to create a Groovy project, build it, run tests and view the test report, and generate API docs.
Write a simple library in Kotlin, test it with JUnit and publish it.
Use the Build Init plugin to create a Scala project, build it, run tests and view the test report, and generate the API docs.
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.
Use the Build Init plugin to create a client-side Groovy 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.
Use the Build Init plugin to create a client-side Kotlin 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.
Use the Build Init plugin to create a client-side Scala 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.
Setup a project for building and testing Java Modules for the Java Module System.
Learn how to consume external JVM artifacts by building a small Java application.
Building C++ Applications
Native
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.
Building C++ Libraries
Native
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.
Building Swift Applications
Native
Create a project for Swift language files. Add a Swift source file. Use Gradle to generate a command-line application. Run the application and view the results, along with the output of the compiler and linker.
Building Swift Libraries
Native
Create a project for Swift libraries. Add a Swift source file. Use Gradle to generate static-linkable and dynamic linkable libraries. View the outputs of the compiler and linker.
Executing Gradle Builds on Jenkins
Continuous Integration
Learn how to configure and execute Gradle builds on Jenkins.
Executing Gradle Builds on TeamCity
Continuous Integration
Learn how to configure and execute Gradle builds on TeamCity.
Executing Gradle Builds on Travis CI
Continuous Integration
Learn how to configure and execute Gradle builds on Travis CI.
Building Android applications
Android
Create a project for Android application. Create a "Hello, World!" project with Android Studio and run it.
Topical
In-depth advice from the experts on specific topics of interest.
Designing Gradle Plugins
Plugin Development
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.
Implementing Gradle Plugins
Plugin Development
Create a Gradle plugin using custom task types, incremental build support, and recommendations for configuration choices.
Testing Gradle Plugins
Plugin Development
Learn how to effectively test plugins in a manual and automated fashion. Demonstrates the use of composite builds, popular test frameworks and Gradle TestKit.
Publishing Plugins to Gradle Plugin Portal
Plugin Development
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.
Using the Worker API
Plugin Development
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.
Optimizing Gradle Build Performance
Fundamentals
Improve the performance of your build using Build Scan™, dependency resolution strategies, parallel execution, incremental and partial builds, and more. Includes specific recommendations for Java and Android projects.
Using the Build Cache
Fundamentals
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.
Migrating build logic from Groovy to Kotlin
Fundamentals
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.