GRADLE(1)
π GRADLE(1) β the gradle command line, but make it make sense π
okay bestie, welcome to the Gradle Command Line Manual β¨ (that's the manual name, iykyk). This is the gradle page β adaptable, fast automation for all π¦
πΈ NAME πΈ
gradle β adaptable, fast automation for all π
β¨ SYNOPSIS β¨
gradle [option...] [task...]
like. that's it. that's the whole vibe. options and tasks, go off π
π OPTIONS π
Real talk first: there's a detailed guide of the command line interface on Gradle's official website. The project itself does not provide a manpage, so maintaining this one is error-prone and costly π (not me being honest about my own job).
Anyway β here's the summary of the options. All of them. Every single one. No skipping π«Ά
-?,-h,--helpβ Shows a help message. your classic cry-for-help button, love that for you π-a,--no-rebuildβ (deprecated π« ) Do not rebuild project dependencies.--allβ Shows additional detail in the task listing. See the documentation section LISTING TASKS.-b,--build-fileβ Specifies the build file. See the documentation section SELECTING BUILD.--build-cacheβ (incubating πΆ) Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds. it's giving "why redo work when you can not" π--no-build-cacheβ (incubating πΆ) Disables the Gradle build cache.-c,--settings-fileβ Specifies the settings file.--consoleβ Specifies which type of console output to generate. Pick your aesthetic, bestie:- Set to
plainto generate plain text only. This option disables all color and other rich output in the console output. - Set to
auto(the default) to enable color and other rich output in the console output when the build process is attached to a console, or to generate plain text only when not attached to a console. - Set to
richto enable color and other rich output in the console output, regardless of whether the build process is not attached to a console. When not attached to a console, the build output will use ANSI control characters to generate the rich output. - Set to
verboseto enable color and other rich output like therich, but output more detailed message (task name, output, etc.)
- Set to
--continueβ Continues task execution after a task failure. it's the "we don't stop, we keep going" energy β¨--configure-on-demandβ (incubating πΆ) Only relevant projects are configured in this build run. This means faster builds for large multi-projects. See the documentation section CONFIGURATION ON DEMAND.--no-configure-on-demandβ (incubating πΆ) Disables the use of configuration on demand.-D,--system-propβ Sets a system property of the JVM, for example-Dmyprop=myvalue. See the documentation section GRADLE PROPERTIES AND SYSTEM PROPERTIES.-d,--debugβ Log in debug mode (includes normal stacktrace). See the documentation section LOGGING.-g,--gradle-user-homeβ Specifies the Gradle user home directory. The default is the.gradledirectory in the user's home directory.--include-buildβ Run the build as a composite, including the specified build. See the documentation section COMPOSITE BUILDS.-I,--init-scriptβ Specifies an initialization script. See the documentation section INIT SCRIPTS.-i,--infoβ Set log level to info. See the documentation section LOGGING.-m,--dry-runβ Runs the build with all task actions disabled. See the documentation section DRY RUN.--offlineβ Specifies that the build should operate without accessing network resources. See the documentation section CACHE COMMAND LINE OPTIONS.-P,--project-propβ Sets a project property of the root project, for example-Pmyprop=myvalue. See the documentation section GRADLE PROPERTIES AND SYSTEM PROPERTIES.-p,--project-dirβ Specifies the start directory for Gradle. Defaults to current directory. See the documentation section SELECTING BUILD.--parallelβ (incubating πΆ) Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. This option should only be used with decoupled projects (see the documentation section DECOUPLED PROJECTS). For limitations of this option please see the documentation section PARALLEL EXECUTION.--no-parallelβ (incubating πΆ) Disables parallel execution to build projects.--max-workersβ (incubating πΆ) Sets the maximum number of workers that Gradle may use. For example--max-workers=3. The default is the number of processors.--profileβ Profiles build execution time and generates a report in thebuildDir/reports/profiledirectory. See the documentation section PROFILING BUILD.--project-cache-dirβ Specifies the project-specific cache directory. Default value is.gradlein the root project directory.-q,--quietβ Log errors only. See the documentation section LOGGING.--recompile-scriptsβ (deprecated π« ) Forces scripts to be recompiled, bypassing caching. This option has been deprecated and is scheduled to be removed Gradle 5.0. You should avoid using it.--refresh-dependenciesβ Refresh the state of dependencies. See the documentation section CACHE COMMAND LINE OPTIONS.--rerun-tasksβ Specifies that any task optimization is ignored.-S,--full-stacktraceβ Print out the full (very verbose) stacktrace for any exceptions. See the documentation section LOGGING.-s,--stacktraceβ Print out the stacktrace also for user exceptions (e.g. compile error). See the documentation section LOGGING.--scanβ (incubating πΆ) Creates a build scan. Gradle will auto-apply the build scan plugin with a compatible version. For more information about build scans, please visit<https://gradle.com/build-scans>.--no-scanβ (incubating πΆ) Disables the creation of a build scan. For more information about build scans, please visit<https://gradle.com/build-scans>.-t,--continuousβ (incubating πΆ) Enables continuous building - Gradle will automatically re-run when changes are detected. it's giving "I'll just keep watching, bestie" π-u,--no-search-upwardβ Don't search in parent directories for asettings.gradlefile.-v,--versionβ Prints version info.-w,--warnβ Set log level to warn. See the documentation section LOGGING-x,--exclude-taskβ Specifies a task to be excluded from execution. See the documentation section EXCLUDING TASKS FROM THE COMMAND LINE.
β¨ PSA: the above information is printed to the console when you execute gradle -h. so if you forget literally everything, just ask Gradle herself π
π§ DAEMON COMMAND-LINE OPTIONS π§
The documentation section GRADLE DAEMON contains more information about the daemon. For example it includes information how to turn on the daemon by default so that you can avoid using --daemon all the time. (main character energy: set it once, never think about it again π)
--daemonβ Uses the Gradle daemon to run the build. Starts the daemon if not running or existing daemon busy. the documentation section GRADLE DAEMON contains more detailed information when new daemon processes are started.--no-daemonβ Does not use the Gradle daemon to run the build.--foregroundβ Starts the Gradle daemon in the foreground. Useful for debugging or troubleshooting because you can easily monitor the build execution.--no-daemonβ Do not use the Gradle daemon to run the build. Useful occasionally if you have configured Gradle to always run with the daemon by default.
π not the manpage listing --no-daemon twice with two different descriptions. I'm not fixing it, I'm not merging them, I'm just reporting the lore fr fr. Both are here, both are real, we respect the original.
--statusβ List running and recently stopped Gradle daemons. Only displays daemons of the same Gradle version.--stopβ Stops the Gradle daemon if it is running. You can only stop daemons that were started with the Gradle version you use when running--stop.
π SYSTEM PROPERTIES π
The following system properties are available for the gradle command. Note that command-line options take precedence over system properties. π (options stay winning)
gradle.user.homeβ Specifies the Gradle user home directory.
The documentation section GRADLE CONFIGURATION PROPERTIES contains specific information about Gradle configuration available via system properties.
π ENVIRONMENT VARIABLES π
The following environment variables are available for the gradle command. Note that command-line options and system properties take precedence over environment variables. (yes bestie, the hierarchy is real: options > system properties > env vars π
)
GRADLE_OPTSβ Specifies command-line arguments to use to start the JVM. This can be useful for setting the system properties to use for running Gradle. For example you could setGRADLE_OPTS="-Dorg.gradle.daemon=true"to use the Gradle daemon without needing to use the--daemonoption every time you run Gradle. the documentation section GRADLE CONFIGURATION PROPERTIES contains more information about ways of configuring the daemon without using environmental variables, e.g. in more maintainable and explicit way.GRADLE_USER_HOMEβ Specifies the Gradle user home directory (which defaults to βUSER_HOME/.gradleβ if not set).JAVA_HOMEβ Specifies the JDK installation directory to use.
π¦ SEE ALSO π¦
<https://docs.gradle.org/current/userguide/command_line_interface.html> β go read the actual guide, she's iconic β¨
π AUTHORS π
Gradle developers π«Ά
okay that's the whole page, no cap, every flag accounted for π this was Gradle 4.4.1, dated 2025-01-18, and it lives under the name GRADLE(1) in the Gradle Command Line Manual. periodt. π
β¨
π¦ where this page comes from
- debian trixie: gradle 4.4.1-22 Β· Apache-2.0
- ubuntu questing: gradle 4.4.1-22
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms