I am setting up flutter for mobile app development without Android Studio. everything has been set except Gradle. For Gradle, I am setting environment variables but I am confused with two variables
In the docs we have Configure your system environment for Microsoft Windows users where is written that you could also add the environment variable
GRADLE_HOME and point this to the unzipped distribution.
In my project file
\gradle\wrapper\gradle-wrapper.properties, there are also some variables
zipStoreBase which are set to
Are both variables different??? Do we need to set both variables???
You should set neither, but yes, they are different.
GRADLE_HOME refers to the Gradle distribution your are using. If you set it like documented it has no effect alone. It is described to then use that variable in the
PATH variable, so that after a version update you can just update that variable instead of
PATH directly. But actually you do not need any version installed at all, as practically all Gradle builds should have the 4 wrapper files which define which Gradle version to run the build with, so the installed version is not used anyway. An installed version is typically only used to bootstrap a new build and for that you can also use the wrapper of another build.
GRADLE_USER_HOME is the place where Gradle stores caches, provisioned JDKs, wrapper-downloaded Gradle distributions and so on. This is by default in
~/.gradle, but you can set it to a different directory where you want those files to be stored at.
The wrapper properties you showed, say to store the distribution in the given subdirectory of the