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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. CentOS / RHEL : How to delete LUKS encrypted device
  2. CentOS / RHEL : How to remove a mirror with mdadm
  3. pacman –deptest Command Examples
  4. Basic “chmod” Command examples in Linux
  5. What are different Samba Server Types
  6. Puppet Server’s Resources Cheat Sheet with Examples
  7. ctrlaltdel: command not found
  8. needrestart Command Examples in Linux
  9. pacman4console Command Examples in Linux
  10. How To Execute The Pstack Command On CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright