Reputation: 1534
Background: I was using Gradle ver 6.5 & now started using ver 7.2
Issue: IntelliJ downloads ver 6.5, despite making changes in Settings & Windows Environment variables pointing to ver 7.2
In IntelliJ for the Gradle settings, I have specified the below:
Build,Execution,Deployment > Build Tools > Gradle
Use Gradle from: 'wrapper' task in Gradle build script
Gradle Script for wrapper:
wrapper{
gradleVersion = '7.2'
distributionType = Wrapper.DistributionType.BIN
}
I notice that version 6.5 is downloaded as well in the project's .gradle folder. But if I specify the Gradle location directly instead of pointing to wrapper, then it does not download version 6.5
I have checked the Gradle build script & do not find any reference to gradle version 6.5, but it still picks it up. May I know from where is ver 6.5 being picked when specifying use wrapper Task in build script.
Hope query is clear await inputs.
Upvotes: 1
Views: 929
Reputation: 44535
If you update the version in the wrapper
task, you have to execute the task once, so that the URL in the file gradle/wrapper/gradle-wrapper.properties
is updated as well. That URL is used by the wrapper script as well as IntelliJ (if configured that way) to download the correct Gradle distribution.
Upvotes: 2