LinuxCommandLibrary

gradle-build

Gradle full build lifecycle task

TLDR

Build project

$ gradle build
copy
Build without tests
$ gradle build -x test
copy
Build specific module
$ gradle :module:build
copy
Build with info
$ gradle build --info
copy
Build release
$ gradle assembleRelease
copy

SYNOPSIS

gradle build [options]

DESCRIPTION

gradle build compiles source code, runs tests, and produces output artifacts. It is the main build lifecycle task combining compile, test, and assemble phases.
The command executes the complete build process including dependency resolution, compilation, testing, and packaging. It can be customized per project through build scripts.

PARAMETERS

-x TASK

Exclude task.
--info
Info logging level.
--parallel
Parallel execution.
--offline
Offline mode.
--help
Display help information.

CAVEATS

Runs tests by default. Use -x test to skip. First build may download dependencies.

HISTORY

The build task is a standard Gradle lifecycle task inherited from Java plugin conventions.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community