mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-22 05:27:14 +01:00
updating the way app is signed
This commit is contained in:
parent
fe694368e9
commit
e698d46dfa
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,10 +1,11 @@
|
||||
*.iml
|
||||
*.aab
|
||||
.gradle
|
||||
/local.properties
|
||||
/gradle.properties
|
||||
/.idea/
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
debug.keystore
|
||||
release.keystore
|
||||
signing.properties
|
||||
keystore.jks
|
||||
keystore.properties
|
||||
|
@ -2,6 +2,10 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "28.0.3"
|
||||
@ -17,7 +21,12 @@ android {
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@ -46,22 +55,3 @@ dependencies {
|
||||
implementation 'joda-time:joda-time:2.10.1'
|
||||
implementation 'androidx.multidex:multidex:2.0.0'
|
||||
}
|
||||
|
||||
Properties props = new Properties()
|
||||
def propFile = new File('signing.properties')
|
||||
if (propFile.canRead()) {
|
||||
props.load(new FileInputStream(propFile))
|
||||
|
||||
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('KEY_ALIAS') && props.containsKey('PASSWORD')) {
|
||||
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
||||
android.signingConfigs.release.storePassword = props['PASSWORD']
|
||||
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
||||
android.signingConfigs.release.keyPassword = props['PASSWORD']
|
||||
} else {
|
||||
println 'signing.properties found but some entries are missing'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
} else {
|
||||
println 'signing.properties not found'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
|
4
keystore.properties_sample
Normal file
4
keystore.properties_sample
Normal file
@ -0,0 +1,4 @@
|
||||
storePassword=123456
|
||||
keyPassword=abcdef
|
||||
keyAlias=myAlias
|
||||
storeFile=../keystore.jks
|
@ -1,3 +0,0 @@
|
||||
STORE_FILE=/path/to/your.keystore
|
||||
KEY_ALIAS=projectkeyalias
|
||||
PASSWORD=yourpass
|
Loading…
Reference in New Issue
Block a user