Learn Gradle | tutorials and examples

Learn Gradle tutorials and examples

What is Gradle ?

Gradle is a Opensource build automation tool to build and run the projects in Android and java based projects


  • Incremental builds Gradle consider the last modified files and last build and only builds with modified files thus improves performance.
  • Parallel task execution
  • Build caching
  • JVM and Android application management

Gradle version

Current version is 7.1.

Gradle Download

gradle tool can be downloaded from here. You can check my other post below to check gradle is installed or not

Gradle download can be from binary form or complete form.

gradle vs maven

There are lot of differences between gradle and maven.

You can check other article difference between gradle and maven

gradle plugins

Gradle plugins are useful to add extra functionality for tasks, dependency and configuration values

Frequently used plugins

  • java plugin
  • maven plugin
  • android plugin

What is Gradle wrapper

Gradle wrapper is an command line tool to start the gradle build project.

It contains two batch script files in gradle based projects

  • gradlew.bat for windows
  • gradlew.sh for Linux system

gradle wrapper allows you to run and build projects without installs on local machine.

These gradle wrapper scripts are added by default with gradle project.

You can still add using below command

gradle wrapper --gradle-version 7.1.1

This adds following files to project.

└── <project folder>
    └── gradlew
    └── gradlew.bat
    └── build.gradle
    └── gradle
        └── wrapper
            └── gradle-wrapper.jar
            └── gradle-wrapper.properties

You can also check difference between gradle and gradlew command

Gradle Cheat sheet

Parameter   Description  
gradle installs and configure How to install gradle on windows,Linux and Mac OS, configure environment variables to setup
gitignore gradle project How to add gitignore to gradle projects for android and java projects
Gradle command list It includes frequently used command build and running java projects
gradle dependency tree In this tutorial, Different ways to get dependency graph for single and multi modular gradle projects
Gradle exclude dependencies How to exclude dependencies at globally as wellas per transitive dependencies
gradle force redownload dependency On this tutorial, Learned multiple ways how to remove and update dependencies
gradle ignore test case execution In this post, You learned different ways to exclude running test cases with all as well as single test cases
Configure JDK version in gradle How to configure javac source and target java jdk versions in gradle build
Running single test cases Different ways to compile and execute single test cases
Difference between gradle and gradlew Explain main difference between gradle and gradlewrapper commands
Difference between gradle and maven Explain main difference between gradle and maven builds
Permission Denied error in gradle How to fix an permission denied error in gradle running in linux and unix
release api in android In this tutorial, posted about generating an release signed and unsigned APK file in android apps using gradle build
gitignore-gradle-project In this Section, discussed about what not to commit in android application for gitignore file during commit to repository
Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.

Similar Posts
You'll get a notification every time a post gets published here.