-
Notifications
You must be signed in to change notification settings - Fork 9
/
properties-util.gradle
25 lines (22 loc) · 990 Bytes
/
properties-util.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Properties localProperties = new Properties()
def localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localProperties.load(localPropertiesFile.newDataInputStream())
}
def storeFile = localProperties.getProperty('STORE_FILE')
def storePassword = localProperties.getProperty('STORE_PASSWORD')
def keyAlias = localProperties.getProperty('KEY_ALIAS')
def keyPassword = localProperties.getProperty('KEY_PASSWORD')
ext {
propertyHaveSigningConfigs = (storeFile != null && file(storeFile).exists() && storePassword != null && keyAlias != null && keyPassword != null)
propertyStoreFile = storeFile
propertyStorePassword = storePassword
propertyKeyAlias = keyAlias
propertyKeyPassword = keyPassword
propertyBuglyId = localProperties.getProperty('BUGLY_ID', "\"\"")
}
if (propertyHaveSigningConfigs) {
logger.quiet("propertyHaveSigningConfigs true")
} else {
logger.quiet("propertyHaveSigningConfigs false")
}