gw is a gdub clone written in Rust for fun. It finds the nearest gradle build file and executes it with the corresponding wrapper. Any arguments passed to gw are passed to the wrapper. If there is no gradle wrapper it tries to use gradle from $PATH. Works on Linux, MacOS and Windows.
Call gw build
anywhere in your gradle project and it will call ./gradlew build
in the directory of the nearest gradle build file.
without gw | with gw |
---|---|
./gradlew build |
gw build |
../gradlew build |
gw build |
../../gradlew build |
gw build |
... |
|
gradle build |
gw build |
gradle -b ../build.gradle build |
gw build |
gradle -b ../../build.gradle build |
gw build |
... |
- Download a release binary for your platform
- Rename it to
gw
or on windowsgw.exe
- Put it on your $PATH
- Enjoy
gw
in your gradle projects
- Run "Powershell" from the start menu.
- Paste following script block and hit Enter. It will always install the latest version.
$BinPath = $HOME + "\.bin\" New-Item -ItemType Directory -Force -Path $BinPath Invoke-WebRequest https://github.com/normartin/rust-gradlew-locator/releases/latest/download/gw-windows-latest.exe -OutFile ($BinPath + "gw.exe") IF (($Env:PATH) -notcontains $BinPath) { [Environment]::SetEnvironmentVariable("Path", $env:Path + ";" + $BinPath, "User") }
- Restart your applications to make them pick up the new $PATH.
- Install Rust's cargo
cargo install gw
- Use
gw
in one of your gradle projects