Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spaceship-prompt/spaceship-gradle

⬡ Gradle section for Spaceship prompt
https://github.com/spaceship-prompt/spaceship-gradle

gradle java shell spaceship spaceship-prompt terminal zsh

Last synced: 4 days ago
JSON representation

⬡ Gradle section for Spaceship prompt

Awesome Lists containing this project

README

        


⬡ + 🚀

Spaceship Gradle


Gradle section for Spaceship prompt



GitHub Release


GitHub Workflow Status


Spaceship Twitter


Chat on Discord

Current Gradle version, through `gradle` or `gradlew` (`⬡`).

## Installing

You need to source this plugin somewhere in your dotfiles. Here's how to do it with some popular tools:

### [Oh-My-Zsh]

Execute this command to clone this repo into Oh-My-Zsh plugin's folder:

```zsh
git clone https://github.com/spaceship-prompt/spaceship-gradle.git $ZSH_CUSTOM/plugins/spaceship-gradle
```

Include `spaceship-gradle` in Oh-My-Zsh plugins list:

```zsh
plugins=($plugins spaceship-gradle)
```

### [zplug]

```zsh
zplug "spaceship-prompt/spaceship-gradle"
```

### [antigen]

```zsh
antigen bundle "spaceship-prompt/spaceship-gradle"
```

### [antibody]

```zsh
antibody bundle "spaceship-prompt/spaceship-gradle"
```

### [zinit]

```zsh
zinit light "spaceship-prompt/spaceship-gradle"
```

### [zgen]

```zsh
zgen load "spaceship-prompt/spaceship-gradle"
```

### [sheldon]

```toml
[plugins.spaceship-gradle]
github = "spaceship-prompt/spaceship-gradle"
```

### Manual

If none of the above methods works for you, you can install Spaceship manually.

1. Clone this repo somewhere, for example to `$HOME/.zsh/spaceship-gradle`.
2. Source this section in your `~/.zshrc`.

### Example

```zsh
mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-gradle.git "$HOME/.zsh/spaceship-gradle"
```

For initializing prompt system add this to your `.zshrc`:

```zsh title=".zshrc"
source "~/.zsh/spaceship-gradle/spaceship-gradle.plugin.zsh"
```

## Usage

After installing, add the following line to your `.zshrc` in order to include Ember section in the prompt:

```zsh
spaceship add gradle
```

## Options

Shows current Gradle version using `gradle` or `gradlew` only within folder containing `settings.gradle` and `settings.gradle.kts` files.

| Variable | Default | Meaning |
| :------------------------------------- | :--------------------------------: | ----------------------------------------------- |
| `SPACESHIP_GRADLE_SHOW` | `true` | Current Gradle section |
| `SPACESHIP_GRADLE_PREFIX` | `$SPACESHIP_PROMPT_DEFAULT_PREFIX` | Prefix before Gradle section |
| `SPACESHIP_GRADLE_SUFFIX` | `$SPACESHIP_PROMPT_DEFAULT_SUFFIX` | Suffix after Gradle section |
| `SPACESHIP_GRADLE_SYMBOL` | `⬡·` | Character to be shown before Gradle section |
| `SPACESHIP_GRADLE_DEFAULT_VERSION` | ` ` | Gradle version to be treated as default |
| `SPACESHIP_GRADLE_COLOR` | `green` | Color of Gradle section |

## Contributing

First, thanks for your interest in contributing!

Contribute to this repo by submitting a pull request. Please use [conventional commits](https://www.conventionalcommits.org/), since this project adheres to [semver](https://semver.org/) and is automatically released via [semantic-release](https://github.com/semantic-release/semantic-release).

## License

MIT © [Denys Dovhan](http://yourwebsite.com) and Sergey Shatunov

[Oh-My-Zsh]: https://ohmyz.sh/
[zplug]: https://github.com/zplug/zplug
[antigen]: https://antigen.sharats.me/
[antibody]: https://getantibody.github.io/
[zinit]: https://github.com/zdharma/zinit
[zgen]: https://github.com/tarjoilija/zgen
[sheldon]: https://sheldon.cli.rs/