diff --git a/client/Android/Studio/.gitignore b/client/Android/Studio/.gitignore index a2dc2317b..cf04735eb 100644 --- a/client/Android/Studio/.gitignore +++ b/client/Android/Studio/.gitignore @@ -15,6 +15,9 @@ gen/ # Local configuration file (sdk path, etc) local.properties +# Local release signing configuration file +release.properties + # Windows thumbnail db Thumbs.db diff --git a/client/Android/Studio/build.gradle b/client/Android/Studio/build.gradle index 81ae37c3e..4047b83d6 100644 --- a/client/Android/Studio/build.gradle +++ b/client/Android/Studio/build.gradle @@ -1,28 +1,28 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. -Properties properties = new Properties() +Properties releaseProperties = new Properties() File file = new File('release.properties') if (file.canRead()) { - properties.load(new FileInputStream(file)) + releaseProperties.load(new FileInputStream(file)) } if (!hasProperty('RELEASE_STORE_FILE')) { - ext.RELEASE_STORE_FILE='nokeyfile' + RELEASE_STORE_FILE=releaseProperties.get('RELEASE_STORE_FILE', '~/.android/debug.keystore') } if (!hasProperty('RELEASE_KEY_ALIAS')) { - ext.RELEASE_KEY_ALIAS='' -} -if (!hasProperty('RELEASE_KEY_ALIAS')) { - ext.RELEASE_KEY_ALIAS='' + RELEASE_KEY_ALIAS=releaseProperties.get('RELEASE_KEY_ALIAS', 'androiddebugkey') } if (!hasProperty('RELEASE_KEY_PASSWORD')) { - ext.RELEASE_KEY_PASSWORD='' + RELEASE_KEY_PASSWORD=releaseProperties.get('RELEASE_KEY_PASSWORD', 'android') +} +if (!hasProperty('RELEASE_STORE_PASSWORD')) { + RELEASE_STORE_PASSWORD=releaseProperties.get('RELEASE_STORE_PASSWORD', 'android') } ext { - compileApi = properties.get('COMPILE_API', 31) - targetApi = properties.get('TARGET_API', 31) - minApi = properties.get('MIN_API', 23) - toolsVersion = properties.get('TOOLS_VERSION', '31.0.0') + compileApi = releaseProperties.get('COMPILE_API', 31) + targetApi = releaseProperties.get('TARGET_API', 31) + minApi = releaseProperties.get('MIN_API', 23) + toolsVersion = releaseProperties.get('TOOLS_VERSION', '31.0.0') println '----------------- Project configuration -------------------' println 'RELEASE_STORE_FILE: ' + RELEASE_STORE_FILE