The Gradle Guides help you use Gradle effectively. Whether you are new to Gradle or an experienced Build Master, the guides hosted here are designed to help you accomplish your goals.
Step-by-step lessons on how to use Gradle, both in general and for specific tasks.
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.
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.
Get started with multi-project builds by developing an application that includes both libraries and documentation.
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.
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.
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.
Create a project for C language files. Add a C source file and header. Use Gradle to generate a command-line executable. Run the application and view the results, along with the output of the compiler and linker.
Create a project for C++ language files. Add a C++ source file and header. Use Gradle to generate a command-line executable. Run the application and view the results, along with the output of the compiler and linker.
Define a Gradle task to bundle web assets with Webpack in a way that leverages Gradle's up-to-date checks and build cache. Demostrate the caching behavior and incremental build capabilities.
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.
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.
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.
In-depth advice from the experts on specific topics of interest
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.
Create a Gradle plugin using custom task types, incremental build support, and recommendations for configuration choices.
See how to convert Maven builds to Gradle. Discusses the differences in the build tools, what you can automate, choices for dependency scope, how to test the results, and more.
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.
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.
Similar to Getting Started Guides, but with greater depth
Create a new Android project using Android Studio. Run standard Gradle tasks to manage dependencies, generate an apk, deploy to multiple emulators simultaneously, and see the results of a build scan.
How to Contribute
Want to contribute your own guide? Here's how
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.
Reference for authoring new guides. Includes recommended style, use of languages and supportive Gradle tasks for authors.