HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gradle clean — Delete the build directory and all generated files. More information: <https://docs.gradle.org/curre

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thedirectorydeletecommandbuildandcligradle clean

Problem

How to use the gradle clean command: Delete the build directory and all generated files. More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#cleaning_outputs>.

Solution

gradle clean — Delete the build directory and all generated files. More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#cleaning_outputs>.

Clean the build directory:
gradle clean


Clean and then build the project:
gradle clean build


Clean a specific subproject in a multi-project build:
gradle :{{subproject}}:clean


Clean with more detailed logging:
gradle clean {{[-i|--info]}}

Code Snippets

Clean the build directory

gradle clean

Clean and then build the project

gradle clean build

Clean a specific subproject in a multi-project build

gradle :{{subproject}}:clean

Clean with more detailed logging

gradle clean {{[-i|--info]}}

Context

tldr-pages: common/gradle clean

Revisions (0)

No revisions yet.