1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-03-28 18:53:47 +08:00
ohmyzsh-mirror/plugins/gradle
G'lek Tarssza 32b1498c1b
feat(gradle): Aliased to gradlew as well as gradle.
Added this change to the `README.md`.

Also cleaned/reworded up the `README.md` a touch.
2026-03-12 07:49:40 -06:00
..
_gradle feat(gradle): update completion to version 25da917c (#12287) 2024-03-15 19:55:43 +07:00
gradle.plugin.zsh feat(gradle): Aliased to gradlew as well as gradle. 2026-03-12 07:49:40 -06:00
LICENSE feat(gradle): update completion to version 25da917c (#12287) 2024-03-15 19:55:43 +07:00
README.md feat(gradle): Aliased to gradlew as well as gradle. 2026-03-12 07:49:40 -06:00

Gradle plugin

This plugin adds completions and aliases for Gradle.

To use it, add gradle to the plugins array in your zshrc file:

plugins=(... gradle)

Usage

This plugin creates a function called gradle-or-gradlew, which is aliased to gradle and gradlew. This function is is used to determine whether the current project directory has a gradlew wrapper file. If this file is present it will be used, otherwise the gradle binary from the system environment is used instead. Gradle tasks can be executed directly without regard for whether it is the environment gradle or the gradlew wrapper being invoked. It also supports being called from any directory inside the root directory of a Gradle project.

Examples:

# Enter project directory
cd /my/gradle/project
# Will call `gradlew` if present or `gradle` if not
gradle test
# Enter a sub-directory of the project directory
cd my/sub/directory
# Will call `gradlew` from `/my/gradle/project` if present or `gradle` if not
gradlew build

Completion

This plugin uses the completion from the Gradle project, which is distributed under the MIT license.