Gradle broke after updating it the wrong way - macOs

So, this is what happened. I didn’t know I had to use ./gradlew wrapper --gradle-version {NEW_VERSION} --distribution-type bin to update gradle, so I just bumped up the version in the gradle-wrapper.properties file of some projects and now it just won’t work. No matter what I try, even a simple gradle clean won’t work. I get absolutely no output, no error, nothing.

I’ve tried reinstalling gradle, deleting the gradle folder inside the projects folder to try and rebuild the wrapper but nothing happens when I type any gradle command inside any project. Gradle works perfectly inside intellij though.

Ps: it doesn’t work in any project. No matter if I try to use the installed gradle or the wrapper. Even in new cloned projects. Also, that was a few months ago, but as it was working in intellij, I never bothered.

You don’t have to use that command to update Gradle in a particular build. The first time you run this command, all it does is update the contents of gradle-wrapper.properties as you have done. If you run that task again, it will also update to the gradlew / gradlew.bat scripts and gradle-wrapper.jar with any changes provided by the updated version (but these don’t often change and the updates are usually unnecessary - minor tweaks or compatibility with new shells).

Updating the wrapper of one project will not impact other projects and will not impact a Gradle installation (when you have one). If neither a Gradle installation nor the Gradle wrapper works, this suggests that something in your user environment is likely the culprit. It can still work in IntelliJ because IntelliJ can be overriding whatever is causing the issue in its own environment.

It’s hard to say what exactly you need to fix without more debugging and information, but there’s nothing inherently wrong with how you updated the wrapper.

I haven’t been able to find what is causing the issue yet. Thanks though