← 返回命令列表

Linux command

gradle-clean 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Clean build directory

gradle clean

Clean specific module

gradle :module:clean

Clean and build

gradle clean build

说明

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.

参数

--info
Info logging.
--help
Display help information.

FAQ

What is the gradle-clean command used for?

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.

How do I run a basic gradle-clean example?

Run `gradle clean` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --info do in gradle-clean?

Info logging.