Intellij 2023.2.2 Does not use gradle version specified in gradle-wrapper.properties
已回答
since i recently updated to Intellij 2023.2.2 the option to set "Use Gradle from:" disappeared "Build Tools → Gradle" Settings. I used to have this field set to ‘gradle-wrapper.properties’ file.
I assumed after reeading the documentation that setting “Distribution” too wrapper should have a similar effect.
However if I try to build and deploy ( with the tool that worked perfectly before the update) using the “gradle-wrapper.properties” file:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
I get the error:
Script compilation errors:
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1s
2 actionable tasks: 2 executed
Why does my build try to use Gradle 9.0 here? How can I make Intellij use the gradle version specified in “gradle-wrapper.properties” file?
请先登录再写评论。
Hello, Manuel!
Thank you for reporting this!
Seems like IDEA is using its' default version of the Wrapper for your Project.
Try running
gradle wrapper --gradle-version 7.6.1
from the Terminal, that should deploy the Wrapper version you are looking for.