Subcommands (10)
gradle build
→Build a project using Gradle.
gradle clean
→Delete the build directory and all generated files.
gradle dependencies
→Display the dependency tree for a Gradle project.
gradle dependencyInsight
→Display insight into a specific dependency in a Gradle project.
gradle init
→Initialize a new Gradle project interactively.
gradle projects
→Display the sub-projects of a Gradle project.
gradle properties
→Display the properties of a Gradle project.
gradle tasks
→List available tasks in a Gradle project.
gradle test
→Run tests using Gradle.
gradle wrapper
→Generate the Gradle wrapper files for a project.
Options (1)
-x, --exclude-taskbooleanExclude test task
Example:
gradle build {{[-x|--exclude-task]}} testExamples (7)
Compile a package
Exclude test task
gradle build [-x|--exclude-task] testRun in offline mode to prevent Gradle from accessing the network during builds
gradle build --offlineClear the build directory
Build an Android Package (APK) in release mode
gradle assembleReleaseList the main tasks
List all the tasks
gradle tasks --allmade by @shridhargupta | data from tldr-pages