• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

gradle: command not found

by admin

Gradle is the newest addition to the Java build project automation tool family. It is open sourced under Apache License 2.0 and its first version (0.7) was released in 2009. Gradle has been gaining a lot of adoption as it draws on lessons learned from other existing build tools such as Ant and Maven. Several high-profile projects such as Android, Spring Framework, and Hibernate have migrated their build systems to use Gradle.

Gradle Features:

  • Declarative Dependency Management
  • Declarative Builds
  • Build by Convention
  • Incremental Builds
  • Gradle Wrapper
  • Plugins
  • Open Source

If you get below error while running the gradle command:

gradle: command not found

you may install the gradle package as shown below as per your choice of distribution.

Distribution Command
OS X brew install gradle
Debian apt-get install gradle
Ubuntu apt-get install gradle
Alpine apk add gradle
Arch Linux pacman -S gradle
Kali Linux apt-get install gradle
Fedora dnf install gradle
Raspbian apt-get install gradle

gradle Command Examples

1. Compile a package:

$ gradle build

2. Exclude test task:

$ gradle build -x test

3. Run in offline mode to prevent Gradle from accessing the network during builds:

$ gradle build --offline

4. Clear the build directory:

$ gradle clean

5. Build an Android Package (APK) in release mode:

$ gradle assembleRelease

6. List the main tasks:

$ gradle tasks

7. List all the tasks:

$ gradle tasks --all

Filed Under: DevOps, Linux

Some more articles you might also be interested in …

  1. How to Install Bless Hex Editor (Hexadecimal Editor) in Ubuntu
  2. f5fpc Command Examples
  3. How to install git on ubuntu 16.04
  4. Understanding the Network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth#
  5. Is there a CSS parent selector
  6. “git subtree” Command Examples
  7. perf: command not found
  8. How to use wget to download file via proxy
  9. size: command not found
  10. pvcreate Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright