-
Notifications
You must be signed in to change notification settings - Fork 384
/
signing.gradle
21 lines (20 loc) · 945 Bytes
/
signing.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
android {
signingConfigs {
release {
def properties
def propertiesFile = rootProject.file('signing.properties')
if (propertiesFile.exists()) {
properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
}
def getString = { String propertyName, String environmentName, String prompt ->
return properties?.get(propertyName) ?: System.getenv(environmentName) ?:
System.console()?.readLine('\n' + prompt + ': ')
}
storeFile getString('storeFile', 'STORE_FILE', 'Store file')?.with(rootProject.&file)
storePassword getString('storePassword', 'STORE_PASSWORD', 'Store password')
keyAlias getString('keyAlias', 'KEY_ALIAS', 'Key alias')
keyPassword getString('keyPassword', 'KEY_PASSWORD', 'Key password')
}
}
}