mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-02 17:07:08 +01:00
sign the release version of the app
This commit is contained in:
parent
a36f3743b8
commit
22b015937c
@ -14,10 +14,15 @@ android {
|
|||||||
setProperty("archivesBaseName", "contacts")
|
setProperty("archivesBaseName", "contacts")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,3 +47,22 @@ dependencies {
|
|||||||
//debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
//debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||||
//releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
//releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
5
app/proguard-rules.pro
vendored
5
app/proguard-rules.pro
vendored
@ -0,0 +1,5 @@
|
|||||||
|
# Joda
|
||||||
|
-dontwarn org.joda.convert.**
|
||||||
|
-dontwarn org.joda.time.**
|
||||||
|
-keep class org.joda.time.** { *; }
|
||||||
|
-keep interface org.joda.time.** { *; }
|
3
signing.properties_sample
Normal file
3
signing.properties_sample
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
STORE_FILE=/path/to/your.keystore
|
||||||
|
KEY_ALIAS=projectkeyalias
|
||||||
|
PASSWORD=yourpass
|
Loading…
x
Reference in New Issue
Block a user