mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- 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:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# 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:
|
||||
|
||||
|
||||
25
tldr/gradle-clean
Normal file
25
tldr/gradle-clean
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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]}}`
|
||||
25
tldr/gradle-dependencies
Normal file
25
tldr/gradle-dependencies
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
25
tldr/gradle-dependencyinsight
Normal file
25
tldr/gradle-dependencyinsight
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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]}}`
|
||||
29
tldr/gradle-init
Normal file
29
tldr/gradle-init
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
21
tldr/gradle-projects
Normal file
21
tldr/gradle-projects
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
25
tldr/gradle-properties
Normal file
25
tldr/gradle-properties
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
25
tldr/gradle-tasks
Normal file
25
tldr/gradle-tasks
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
29
tldr/gradle-test
Normal file
29
tldr/gradle-test
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
25
tldr/gradle-wrapper
Normal file
25
tldr/gradle-wrapper
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
@@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Copy files or directories to clipboard:
|
||||
|
||||
`Set-Clipboard -Path "{{path/to/files_or_directories}}"`
|
||||
`Set-Clipboard -Path "{{path oiles_or_directories}}"`
|
||||
|
||||
- Copy multiple files:
|
||||
|
||||
`Set-Clipboard -Path "{{path/to/file1}}","{{path/to/file2}}","{{path/to/file3}}"`
|
||||
`Set-Clipboard -Path "{{path oile1}}","{{path oile2}}","{{path oile3}}"`
|
||||
|
||||
- Clear the clipboard:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user