Looks like there is a way to specify the version of gradle
to use in the project itself. But it is not documented anywhere.
I found these references in their code repository on github:
https://github.com/NativeScript/nativescript-cli/search?q=runtimeGradleVersion
However, it is easy to set gradle
version outside the project in gradle.properties
file.
Linux
On typical Linux(Debian) nodejs|npm installation, the location of this file is:
/usr/local/lib/node_modules/nativescript/vendor/gradle-plugin/gradle/wrapper/gradle-wrapper.properties
For example, if you wish to specify the version 6.4
of gradle
, simply change the line from:
distributionUrl=https\://services.gradle.org/distributions/gradle-{{runtimeGradleVersion}}-bin.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
Windows
The location of the file shall be under:
C:\Users\<username>\AppData\Roaming\npm\nativescript\vendor\gradle-plugin\gradle\wrapper\gradle-wrapper.properties