Better support for external config file

This commit is contained in:
topjohnwu
2018-09-06 14:25:35 -04:00
parent c0f45b6b1e
commit 2d7c1da741
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'
def configProps = new Properties()
configProps.load(new FileInputStream(rootProject.file('config.prop')))
def configPath = project.hasProperty('configPath') ? project.configPath : rootProject.file('config.prop')
configProps.load(new FileInputStream(configPath))
android {
compileSdkVersion rootProject.ext.compileSdkVersion