Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why does intellij have to install a different gradle version for each android project i make

Gradle is just a build system, right? Why does intellij want to download gradle 2.3 when I have the latest gradle version locally installed. If i setup intellij to use the local distribution, the build fails with an error saying no cached version of gradle 4.3 is available for offline mode.

like image 349
saga Avatar asked Oct 20 '25 23:10

saga


1 Answers

Point #1, You can point Intellij to a gradle installation. See Intellij Gradle docs that describes your options, but pay special attention to the next point, which intellij also supports.

Point #2 Build systems also have versions. Gradle is constantly being updated, so building with the wrong version of Gradle can fail.

That is why a gradle script can specify the version that it needs in order to build. This is essentially a bootstrapping process designed to make your build scripts essentially self sufficient. See for example Gradle docs that describe this practice.

like image 166
Haim Zamir Avatar answered Oct 23 '25 12:10

Haim Zamir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!