Skip to content

Instantly share code, notes, and snippets.

@l1x
Created June 17, 2015 19:24
Show Gist options
  • Save l1x/d8ba66343fceb927d691 to your computer and use it in GitHub Desktop.
Save l1x/d8ba66343fceb927d691 to your computer and use it in GitHub Desktop.
Installing a specific version of Gradle with Homebrew
brew tap homebrew/versions
brew search gradle
brew install homebrew/versions/gradle112
gradle -version
brew link --overwrite gradle112
gradle -version
@nhhockeyplayer
Copy link

meanstack@meanstacks-MacBook-Pro api % brew cask install gradle@5.6.4
Error: Cask 'gradle@5.6.4' is unavailable: No Cask with this name exists.

@nhhockeyplayer
Copy link

why wasnt version 6 working for you

why cant w specifically install a peritnet rebvsion insted of the commit install which brew doesnt like

@mariaiano
Copy link

@bipin-nag's method worked like a charm for me - many thanks!

@dimshik100
Copy link

gradle 3.3

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/74edf375423cbdf042bcab464e65f09426c0190f/Formula/gradle.rb

@dimshik100
Copy link

Here is all gradle commits history.

https://gist.github.com/dimshik100/af28c2146651cae9aa9df94b7144f060

You can try to install them by replacing the commit of the relevant version inside the brew command

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/<COMMIT>/Formula/gradle.rb

@tgvdinesh
Copy link

@eyala
Copy link

eyala commented Dec 7, 2020

Looks like installation from a GitHub url doesn't work anymore, but you can download the file and run it locally with
brew install --build-from-source gradle.rb

@ankit-jha
Copy link

Looks like installation from a GitHub url doesn't work anymore, but you can download the file and run it locally with brew install --build-from-source gradle.rb

Thanks

I created gradle.rb for gradle 6.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment