Reputation: 121
In my NativeScript project, after the last Gradle update, I can't build a new Bundle file (for Android release). This error is about the compatibility of some plugins with the new Gradle version.
I think if I could downgrade the Gradle version to the previous one, the build will succeed.
Is any way that I could do the Grandle downgrade on a NativeScript project?
Upvotes: 3
Views: 950
Reputation: 922
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.
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
The location of the file shall be under:
C:\Users\<username>\AppData\Roaming\npm\nativescript\vendor\gradle-plugin\gradle\wrapper\gradle-wrapper.properties
Upvotes: 2