From 5101476e0bea630b94afb0f387b3abf1fe0ac394 Mon Sep 17 00:00:00 2001 From: Cavaler Date: Tue, 28 Jun 2016 20:44:31 +0300 Subject: [PATCH] + Signing + Don't show debug download options in Release --- .gitignore | 5 ++++ .idea/misc.xml | 27 ++++++++++++++++++ app/app.iml | 18 ++++++------ app/build.gradle | 16 +++++++++-- .../com/numista/browser/ApplicationTest.java | 13 --------- .../com/numista/browser/DownloadActivity.java | 11 +++++-- keystore.jks | Bin 0 -> 2211 bytes 7 files changed, 64 insertions(+), 26 deletions(-) delete mode 100644 app/src/androidTest/java/com/numista/browser/ApplicationTest.java create mode 100644 keystore.jks diff --git a/.gitignore b/.gitignore index c3a4baf..42ef7fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.class +*.apk # Mobile Tools for Java (J2ME) .mtj.tmp/ @@ -13,3 +14,7 @@ hs_err_pid* .gradle build/ +gradle/ + +.idea/workspace.xml +local.properties diff --git a/.idea/misc.xml b/.idea/misc.xml index bccea64..10c6850 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,32 @@ + + + + + + + diff --git a/app/app.iml b/app/app.iml index 9f292d1..97d3a48 100644 --- a/app/app.iml +++ b/app/app.iml @@ -64,14 +64,6 @@ - - - - - - - - @@ -80,8 +72,17 @@ + + + + + + + + + @@ -93,6 +94,7 @@ + diff --git a/app/build.gradle b/app/build.gradle index 505f4e2..1b7b37c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,23 @@ apply plugin: 'com.android.application' android { + signingConfigs { + config { + keyAlias 'Numista' + keyPassword 'numista' + storeFile file('E:/Android/NumistaBrowserAS/keystore.jks') + storePassword 'numista' + } + } compileSdkVersion 17 buildToolsVersion "22.0.0" - defaultConfig { applicationId "com.numista.browser" - minSdkVersion 15 - targetSdkVersion 19 + minSdkVersion 17 + targetSdkVersion 17 versionCode 1 versionName "1.0" + signingConfig signingConfigs.config } buildTypes { release { @@ -17,6 +25,8 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + productFlavors { + } } dependencies { diff --git a/app/src/androidTest/java/com/numista/browser/ApplicationTest.java b/app/src/androidTest/java/com/numista/browser/ApplicationTest.java deleted file mode 100644 index d33b3f5..0000000 --- a/app/src/androidTest/java/com/numista/browser/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.numista.browser; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/app/src/main/java/com/numista/browser/DownloadActivity.java b/app/src/main/java/com/numista/browser/DownloadActivity.java index add6d29..572cfdb 100644 --- a/app/src/main/java/com/numista/browser/DownloadActivity.java +++ b/app/src/main/java/com/numista/browser/DownloadActivity.java @@ -44,9 +44,16 @@ protected void onCreate(Bundle savedInstanceState) cbDebugging = (CheckBox)findViewById(R.id.cbDebugging); SharedPreferences sharedPref = getSharedPreferences("prefs", MODE_PRIVATE); - editID.setText(sharedPref.getString("ID", "37918")); - } + if (BuildConfig.DEBUG) + { + editID.setText(sharedPref.getString("ID", "37918")); + } + else + { + cbDebugging.setVisibility(View.GONE); + } + } public void onStart() { diff --git a/keystore.jks b/keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..7ac3f4c7a1176257a64120140d9ec0d309cb8da0 GIT binary patch literal 2211 zcmcIl={wX58=l|H7$K6eXY7aUKg-CLEyrM#$t3d@oy5qJb&RG^jGbsg)+||~?5Bt< zLs=3Ljncu$mIjk-5gM;^uJ^j$JlAtS&voA%Hir#?K%fT&{8QZiWIu0G zh}!{n%0^JkAP_DHNQLi#0tj9;1ONwAp+^CL3j(LYzXk-)RCK!!`%&EbU8lSHwirFU zI^I$qAcc><7DYjY`}4b`C6Ha!Oy85kx&uaQ?uZVy8qns)>VAt9E|YvB69^r`gsnyo zw&Bm9+2(1mTRnbZ>gY+rlRAy)MViOn&f3^5A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