diff --git a/build.gradle b/build.gradle index 3f1b13b9b..a83ecf0aa 100644 --- a/build.gradle +++ b/build.gradle @@ -37,6 +37,35 @@ android { assets.srcDirs = ['tests/assets'] } } + + + /* + * To sign release build, create file gradle.properties in ~/.gradle/ with this content: + * + * signingStoreLocation=/home/key.store + * signingStorePassword=xxx + * signingKeyAlias=alias + * signingKeyPassword=xxx + */ + if (project.hasProperty('signingStoreLocation') && + project.hasProperty('signingStorePassword') && + project.hasProperty('signingKeyAlias') && + project.hasProperty('signingKeyPassword')) { + println "Found sign properties in gradle.properties! Signing build…" + + signingConfigs { + release { + storeFile file(signingStoreLocation) + storePassword signingStorePassword + keyAlias signingKeyAlias + keyPassword signingKeyPassword + } + } + + buildTypes.release.signingConfig = signingConfigs.release + } else { + buildTypes.release.signingConfig = null + } // Do not abort build if lint finds errors lintOptions { diff --git a/src/com/fsck/k9/view/MessageOpenPgpView.java b/src/com/fsck/k9/view/MessageOpenPgpView.java index 06109e874..759623a84 100644 --- a/src/com/fsck/k9/view/MessageOpenPgpView.java +++ b/src/com/fsck/k9/view/MessageOpenPgpView.java @@ -117,7 +117,6 @@ public class MessageOpenPgpView extends LinearLayout { } if (decryptedData != null && signatureResult == null) { // encrypted-only - Log.d(K9.LOG_TAG, "null!"); MessageOpenPgpView.this.setBackgroundColor(mFragment.getResources().getColor( R.color.openpgp_blue)); @@ -312,9 +311,6 @@ public class MessageOpenPgpView extends LinearLayout { sigResult = result.getParcelableExtra(OpenPgpApi.RESULT_SIGNATURE); } - if (sigResult == null) - Log.d(K9.LOG_TAG, "sig null"); - if (K9.DEBUG) Log.d(K9.LOG_TAG, "result: " + os.toByteArray().length + " str=" + output); @@ -324,11 +320,9 @@ public class MessageOpenPgpView extends LinearLayout { mProgress.setVisibility(View.GONE); mFragment.setMessageWithOpenPgp(output, sigResult); - } catch (UnsupportedEncodingException e) { Log.e(K9.LOG_TAG, "UnsupportedEncodingException", e); } - break; } case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: {