1

I have tried changing gradle-wrapper-properties to a newer version, but regardless of what I do, when I run gradle --version I Get 4.4.1. How can I change the gradle version?

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
johnlacrosse
  • 37
  • 1
  • 7

1 Answers1

3

Somewhat related to this answer.

IDE Gradle settings do not affect the Terminal. You need to adjust the PATH in your system environment settings so that Gradle 6.8.3 installation bin subdirectory is the first one or the only one entry. Then logout/login or reboot for the PATH changes to have effect on all the processes including IntelliJ IDEA Terminal.

However, if you import the project in IntelliJ IDEA and run Gradle tasks from the Gradle tool window, it will use whatever version you have configured in the IDE: Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | Use Gradle from.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • I tried this, but whenever I select and apply the new different location for the different distribution version it seems to take no effect and I get back there the version that came by default with the IDE takes precedence – Rafael Santos Jul 20 '23 at 10:54
  • @RafaelSantos IDE doesn't come with Gradle by default. – CrazyCoder Jul 20 '23 at 14:04
  • Intelij does (at least the more recent versions). It's bundled – Rafael Santos Jul 20 '23 at 14:26
  • @RafaelSantos Please report at https://youtrack.jetbrains.com/newIssue?project=IDEA and provide the exact steps to reproduce / a video of the issue. It does not happen for me in the current IDE release. – CrazyCoder Jul 20 '23 at 14:47