NativeScript: How do i persist custom gradle.properties outside the platform-folder?

642 views Asked by At

Is there any way to store a custom "gradle.properties" outside the folder "platforms/". I want to store this file outside the platforms-folder because the content in there can be overridden if i do an update of the platform.

I've tried following

  • Put the gradle.properties inside App_Resources/Android -> didn't work
2

There are 2 answers

1
Insyte On BEST ANSWER

As of @nativescript/android v6.1.0 user defined gradle properties are supported.

Create a new file <App_Resources>/Android/gradle.properties

This file will be picked up by NativeScript and override any existing properties.

1
Narendra On

You can play with app.gradle or build or settings.gradle as per these guidelines. You can update these files App_Resources/Android and whenever you build your project, it will override gradle.properties file in platform folder.