Permalink
Browse files

Fix build script failing when there is no property file available

  • Loading branch information...
1 parent ca144b7 commit 94e06424ff9efbd27e8d9005fc3eb954c25ceb33 @eyedol eyedol committed Aug 9, 2013
Showing with 21 additions and 18 deletions.
  1. +1 −1 build.sh
  2. +20 −17 smssync/build.gradle
View
2 build.sh
@@ -62,7 +62,7 @@ fi
log "Config looks OK."
log "Building smssync..."
-./gradlew assemble
+./gradlew clean assemble
log "Smssync built."
# test build requires a running emulator. Create and run and emulator
View
37 smssync/build.gradle
@@ -43,20 +43,20 @@ android {
}
signingConfigs {
- release
+
+ releaseSign
}
buildTypes {
proguard.initWith(buildTypes.debug)
proguard {
runProguard true
- proguardFile getDefaultProguardFile('proguard-andronid.txt')
+ proguardFile getDefaultProguardFile('proguard-android.txt')
}
release {
- signingConfigs.release
-
+ signingConfig signingConfigs.releaseSign
}
debug {
@@ -73,7 +73,7 @@ android {
}
defaultConfig {
- versionCode 16
+ versionCode 17
versionName "2.4"
minSdkVersion 8
targetSdkVersion 18
@@ -106,19 +106,22 @@ android {
file("$project.buildDir/apk/" + newName.replace("-unaligned", ""));
}
}
+}
- if (project.hasProperty('releaseKeyStore') &&
- project.hasProperty('releaseKeyPassword') &&
- project.hasProperty('releaseKeyStorePassword') &&
- project.hasProperty('releaseKeyAlias')) {
- android.signingConfigs.release.keyAlias = releaseKeyAlias
- android.signingConfigs.release.storeFile = file(releaseKeyStore)
- android.signingConfigs.release.storePassword = releaseKeyStorePassword
- android.signingConfigs.release.keyPassword = releaseKeyPassword
- } else {
- buildTypes.release.signingConfig = null
- }
-
+if (project.hasProperty('releaseKeyStore') &&
+ project.hasProperty('releaseKeyPassword') &&
+ project.hasProperty('releaseKeyStorePassword') &&
+ project.hasProperty('releaseKeyAlias')) {
+ android.signingConfigs.releaseSign.keyAlias = releaseKeyAlias
+ android.signingConfigs.releaseSign.storeFile = file(releaseKeyStore)
+ android.signingConfigs.releaseSign.storePassword = releaseKeyStorePassword
+ android.signingConfigs.releaseSign.keyPassword = releaseKeyPassword
+} else {
+ android.signingConfigs.releaseSign.keyAlias ""
+ android.signingConfigs.releaseSign.storeFile null
+ android.signingConfigs.releaseSign.storePassword ""
+ android.signingConfigs.releaseSign.keyPassword ""
}
+

0 comments on commit 94e0642

Please sign in to comment.