LinuxCommandLibrary

gradle-clean

Gradle build artifact removal task

TLDR

Clean build directory

$ gradle clean
copy
Clean specific module
$ gradle :module:clean
copy
Clean and build
$ gradle clean build
copy

SYNOPSIS

gradle clean [options]

DESCRIPTION

gradle clean removes the build directory and all generated output. It deletes compiled classes, packaged artifacts, and cached build data, ensuring a fresh build environment.
The task is useful when builds become inconsistent or caches are corrupted, forcing a complete rebuild on the next invocation.

PARAMETERS

--info

Info logging.
--help
Display help information.

CAVEATS

Removes all build output. Next build will be full rebuild. Doesn't clean dependencies.

HISTORY

The clean task is a standard Gradle lifecycle task for build artifact removal.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community