gradle*: add page (#20558)

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
Emmanuel Ferdman
2026-01-08 01:17:55 +02:00
committed by GitHub
parent 5dc46d8aec
commit e23a888449
11 changed files with 186 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# gradle build
> Build a project using Gradle.
> More information: <https://docs.gradle.org/current/userguide/gradle_basics.html>.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#common_tasks>.
- Build the project:
+20
View File
@@ -0,0 +1,20 @@
# 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]}}`
+20
View File
@@ -0,0 +1,20 @@
# gradle dependencies
> Display the dependency tree for a Gradle project.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#listing_project_dependencies>.
- Display all dependencies:
`gradle dependencies`
- Display dependencies for a specific configuration:
`gradle dependencies --configuration {{implementation}}`
- Display dependencies for a specific subproject:
`gradle :{{subproject}}:dependencies`
- Display dependencies and save to a file:
`gradle dependencies > {{path/to/dependencies.txt}}`
+20
View File
@@ -0,0 +1,20 @@
# gradle dependencyInsight
> Display insight into a specific dependency in a Gradle project.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#reporting_dependencies>.
- Show insight for a specific dependency:
`gradle dependencyInsight --dependency {{package_name}}`
- Show insight for a dependency in a specific configuration:
`gradle dependencyInsight --dependency {{package_name}} --configuration {{configuration_name}}`
- Show insight for a specific subproject:
`gradle :{{subproject}}:dependencyInsight --dependency {{package_name}}`
- Show insight with the full dependency path:
`gradle dependencyInsight --dependency {{package_name}} {{[-i|--info]}}`
+24
View File
@@ -0,0 +1,24 @@
# gradle init
> Initialize a new Gradle project interactively.
> More information: <https://docs.gradle.org/current/userguide/build_init_plugin.html>.
- Initialize a new Gradle project interactively:
`gradle init`
- Initialize a project of a specific type:
`gradle init --type {{basic|java-application|java-library|...}}`
- Initialize a project with a specific DSL:
`gradle init --dsl {{groovy|kotlin}}`
- Initialize a project with a specific test framework:
`gradle init --test-framework {{junit-jupiter|testng|spock}}`
- Initialize a project without interactive prompts:
`gradle init --type {{java-application}} --dsl {{kotlin}} --test-framework {{junit-jupiter}}`
+16
View File
@@ -0,0 +1,16 @@
# gradle projects
> Display the sub-projects of a Gradle project.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#listing_projects>.
- Display all sub-projects:
`gradle projects`
- Display sub-projects with their descriptions:
`gradle projects {{[-i|--info]}}`
- Display sub-projects of a specific project in a multi-project build:
`gradle :{{subproject}}:projects`
+20
View File
@@ -0,0 +1,20 @@
# gradle properties
> Display the properties of a Gradle project.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#listing_project_properties>.
- Display all project properties:
`gradle properties`
- Display properties with detailed output:
`gradle properties {{[-i|--info]}}`
- Display properties for a specific subproject:
`gradle :{{subproject}}:properties`
- Display a specific property value:
`gradle properties | grep {{property_name}}`
+20
View File
@@ -0,0 +1,20 @@
# gradle tasks
> List available tasks in a Gradle project.
> More information: <https://docs.gradle.org/current/userguide/command_line_interface.html#listing_tasks>.
- List the main tasks:
`gradle tasks`
- List all tasks including subtasks:
`gradle tasks --all`
- List tasks in a specific group:
`gradle tasks --group {{group_name}}`
- List tasks for a specific subproject:
`gradle :{{subproject}}:tasks`
+24
View File
@@ -0,0 +1,24 @@
# gradle test
> Run tests using Gradle.
> More information: <https://docs.gradle.org/current/userguide/java_testing.html>.
- Run all tests:
`gradle test`
- Run tests with detailed output:
`gradle test {{[-i|--info]}}`
- Run a specific test class:
`gradle test --tests {{class_name}}`
- Run tests matching a pattern:
`gradle test --tests "{{pattern}}"`
- Rerun tests even if up-to-date:
`gradle test --rerun`
+20
View File
@@ -0,0 +1,20 @@
# gradle wrapper
> Generate the Gradle wrapper files for a project.
> More information: <https://docs.gradle.org/current/userguide/gradle_wrapper.html>.
- Generate wrapper with the current Gradle version:
`gradle wrapper`
- Generate wrapper with a specific Gradle version:
`gradle wrapper --gradle-version {{8.5}}`
- Generate wrapper with a specific distribution type:
`gradle wrapper --distribution-type {{bin|all}}`
- Generate wrapper using a specific distribution URL:
`gradle wrapper --gradle-distribution-url {{url}}`
+1 -1
View File
@@ -9,7 +9,7 @@
- Exclude test task:
`gradle build {{[-x|--exclude-task]}} {{test}}`
`gradle build {{[-x|--exclude-task]}} test`
- Run in offline mode to prevent Gradle from accessing the network during builds: