mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(gradle): add gradle module (#4423)
* docs: document gradle module * implement gradle module * gradle-module: add test for wrapper properties case * docs: improve gradle module documentation * fix: fix gradle module wrapper properties test * drop gradle executable strategy * apply suggested stuff * Fix config schema
This commit is contained in:
@@ -291,6 +291,7 @@ $helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$nim\
|
||||
$nodejs\
|
||||
@@ -1927,6 +1928,42 @@ disabled = true
|
||||
format = 'via [🐂](yellow bold) '
|
||||
```
|
||||
|
||||
## Gradle
|
||||
|
||||
The `gradle` module shows the version of the [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html)
|
||||
currently used in the project directory.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `gradle/wrapper/gradle-wrapper.properties` directory.
|
||||
- The current directory contains a file ending with `.gradle` or `.gradle.kts`.
|
||||
|
||||
The `gradle` module is only able to read your Gradle Wrapper version from your config file, we don't execute your wrapper, because of the security concerns.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
|
||||
| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold bright-cyan"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `gradle` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v7.5.1` | The version of `gradle` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Haskell
|
||||
|
||||
The `haskell` module finds the current selected GHC version and/or the selected Stack snapshot.
|
||||
|
||||
Reference in New Issue
Block a user