[android] fix release.properties
This commit is contained in:
parent
47664ea6e7
commit
6250b0a5d4
3
client/Android/Studio/.gitignore
vendored
3
client/Android/Studio/.gitignore
vendored
@ -15,6 +15,9 @@ gen/
|
|||||||
# Local configuration file (sdk path, etc)
|
# Local configuration file (sdk path, etc)
|
||||||
local.properties
|
local.properties
|
||||||
|
|
||||||
|
# Local release signing configuration file
|
||||||
|
release.properties
|
||||||
|
|
||||||
# Windows thumbnail db
|
# Windows thumbnail db
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// 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')
|
File file = new File('release.properties')
|
||||||
if (file.canRead()) {
|
if (file.canRead()) {
|
||||||
properties.load(new FileInputStream(file))
|
releaseProperties.load(new FileInputStream(file))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasProperty('RELEASE_STORE_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')) {
|
if (!hasProperty('RELEASE_KEY_ALIAS')) {
|
||||||
ext.RELEASE_KEY_ALIAS=''
|
RELEASE_KEY_ALIAS=releaseProperties.get('RELEASE_KEY_ALIAS', 'androiddebugkey')
|
||||||
}
|
|
||||||
if (!hasProperty('RELEASE_KEY_ALIAS')) {
|
|
||||||
ext.RELEASE_KEY_ALIAS=''
|
|
||||||
}
|
}
|
||||||
if (!hasProperty('RELEASE_KEY_PASSWORD')) {
|
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 {
|
ext {
|
||||||
compileApi = properties.get('COMPILE_API', 31)
|
compileApi = releaseProperties.get('COMPILE_API', 31)
|
||||||
targetApi = properties.get('TARGET_API', 31)
|
targetApi = releaseProperties.get('TARGET_API', 31)
|
||||||
minApi = properties.get('MIN_API', 23)
|
minApi = releaseProperties.get('MIN_API', 23)
|
||||||
toolsVersion = properties.get('TOOLS_VERSION', '31.0.0')
|
toolsVersion = releaseProperties.get('TOOLS_VERSION', '31.0.0')
|
||||||
|
|
||||||
println '----------------- Project configuration -------------------'
|
println '----------------- Project configuration -------------------'
|
||||||
println 'RELEASE_STORE_FILE: ' + RELEASE_STORE_FILE
|
println 'RELEASE_STORE_FILE: ' + RELEASE_STORE_FILE
|
||||||
|
Loading…
Reference in New Issue
Block a user