summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-04-10 21:32:21 +0200
committerParménides GV <parmegv@sdf.org>2014-04-10 21:32:21 +0200
commit8aa7eabe7ca81595b307f83ddcb1079ceec6d45b (patch)
tree5589f1abcf3e108f9ad6dfc08d48683046281bc5
parentf92948d0151ffe0860ebbd2841a56e76c3b5ff9d (diff)
Release apk signed with debug key if no keystore
You have to edit a gradle.properties file with the following structure: storeFileProperty=fullPath storePasswordProperty=store password without quotation marks keyAliasProperty=key alias without quotation marks keyPasswordProperty=key password without quotation marks
-rw-r--r--app/build.gradle25
1 files changed, 7 insertions, 18 deletions
diff --git a/app/build.gradle b/app/build.gradle
index e53c0f26..94823b02 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,32 +13,21 @@ android {
}
signingConfigs {
- release
+ release {
+ storeFile project.hasProperty('storeFileProperty') ? file(storeFileProperty) : null
+ storePassword project.hasProperty('storePasswordProperty') ? storePasswordProperty : ""
+ keyAlias project.hasProperty('keyAliasProperty') ? keyAliasProperty : ""
+ keyPassword project.hasProperty('keyPasswordProperty') ? keyPasswordProperty : ""
+ }
}
buildTypes {
release {
runProguard true
- signingConfig signingConfigs.release
+ signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug
}
}
- if (project.hasProperty('storeFile')) {
- signingConfigs.release.storeFile = new File(storeFile)
- }
-
- if (project.hasProperty('storePassword')) {
- signingConfigs.release.storePassword = storePassword
- }
-
- if (project.hasProperty('keyAlias')) {
- signingConfigs.release.keyAlias = keyAlias
- }
-
- if (project.hasProperty('keyPassword')) {
- signingConfigs.release.keyPassword = keyPassword
- }
-
lintOptions {
abortOnError false
}