I have to update some variables in both top-level and app/module build.gradle file from the properties file. Can you please suggest which is the best common place to load the properties file ?
For example, I need to update the gradle build tool version in top-level build.gradle file
classpath "com.android.tools.build:gradle:XXXXXX"
In my app/build.gradle, I need to update few dependencies as well
implementation 'androidx.appcompat:appcompat:XXXXX'
implementation 'com.google.android.material:material:XXXXX'
implementation 'com.google.code.gson:gson:XXXXX'
I need to load the below properties file in a common place from where I can access those properties in both the build.gradle files.
def buildPropertiesFile = file("build.properties")
def buildProperties = new Properties()
buildProperties.load(new FileInputStream(buildPropertiesFile))
Thanks in advance