From d181de577a55933299f6a391d93af36df8f14d36 Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Thu, 19 Sep 2019 15:22:53 +0530 Subject: [PATCH 1/6] proguard configuration added --- ostsdk/build.gradle | 8 +++++++- ostsdk/proguard-android-optimize.txt | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ostsdk/proguard-android-optimize.txt diff --git a/ostsdk/build.gradle b/ostsdk/build.gradle index 7050bb4c..8e1b9985 100644 --- a/ostsdk/build.gradle +++ b/ostsdk/build.gradle @@ -11,6 +11,11 @@ apply plugin: 'com.android.library' apply from: 'maven-push.gradle' +/** + * Run Proguard to shrink the Java bytecode in release builds. + */ +def enableProguardInReleaseBuilds = true + android { compileSdkVersion 28 defaultConfig { @@ -40,7 +45,8 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { diff --git a/ostsdk/proguard-android-optimize.txt b/ostsdk/proguard-android-optimize.txt new file mode 100644 index 00000000..c4e7986a --- /dev/null +++ b/ostsdk/proguard-android-optimize.txt @@ -0,0 +1,15 @@ +#Don't ignore non-public library classes. +-dontskipnonpubliclibraryclasses +#Don't obfuscate the input class files. +-dontobfuscate +#Specifies to process the input, even if the output seems up to date. +-forceprocessing +#Number of Optimization passes +-optimizationpasses 5 +#show logs +-verbose +#strip down debug and verbose logs +-assumenosideeffects class android.util.Log { + public static *** d(...); + public static *** v(...); +} \ No newline at end of file From d7e481b5cc1cf48c91d2ebae85ce9643e7297a05 Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Thu, 19 Sep 2019 15:40:34 +0530 Subject: [PATCH 2/6] proguard configuration changes --- ostsdk/proguard-android-optimize.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ostsdk/proguard-android-optimize.txt b/ostsdk/proguard-android-optimize.txt index c4e7986a..d3e56865 100644 --- a/ostsdk/proguard-android-optimize.txt +++ b/ostsdk/proguard-android-optimize.txt @@ -1,9 +1,15 @@ #Don't ignore non-public library classes. -dontskipnonpubliclibraryclasses +#Don't mix class names +-dontusemixedcaseclassnames +#Don't preverify +-dontpreverify +#Don't do arithmetic and variable simplification +-optimizations !code/simplification/arithmetic,!code/allocation/variable #Don't obfuscate the input class files. --dontobfuscate -#Specifies to process the input, even if the output seems up to date. --forceprocessing +-keep class ** +-keepclassmembers class *{*;} +-keepattributes * #Number of Optimization passes -optimizationpasses 5 #show logs From 15dd89e5a9114c873bd420a4aae2cd9aab625032 Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Thu, 19 Sep 2019 19:11:45 +0530 Subject: [PATCH 3/6] proguard config changes --- ostsdk/proguard-android-optimize.txt | 19 +------------------ ostsdk/proguard-rules.pro | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/ostsdk/proguard-android-optimize.txt b/ostsdk/proguard-android-optimize.txt index d3e56865..54ebd824 100644 --- a/ostsdk/proguard-android-optimize.txt +++ b/ostsdk/proguard-android-optimize.txt @@ -1,21 +1,4 @@ -#Don't ignore non-public library classes. --dontskipnonpubliclibraryclasses -#Don't mix class names --dontusemixedcaseclassnames -#Don't preverify --dontpreverify #Don't do arithmetic and variable simplification -optimizations !code/simplification/arithmetic,!code/allocation/variable -#Don't obfuscate the input class files. --keep class ** --keepclassmembers class *{*;} --keepattributes * #Number of Optimization passes --optimizationpasses 5 -#show logs --verbose -#strip down debug and verbose logs --assumenosideeffects class android.util.Log { - public static *** d(...); - public static *** v(...); -} \ No newline at end of file +-optimizationpasses 5 \ No newline at end of file diff --git a/ostsdk/proguard-rules.pro b/ostsdk/proguard-rules.pro index 7a520dd6..8a3b39cd 100644 --- a/ostsdk/proguard-rules.pro +++ b/ostsdk/proguard-rules.pro @@ -20,11 +20,19 @@ # hide the original source file name. #-renamesourcefileattribute SourceFile -# This will strip `Log.v`, `Log.d`, and `Log.i` statements and will leave `Log.w` and `Log.e` statements intact. - +#Don't mix class names +-dontusemixedcaseclassnames +#Don't ignore non-public library classes. +-dontskipnonpubliclibraryclasses +-dontpreverify +#show logs +-verbose +#Don't obfuscate the input class files. +-keep class ** +-keepclassmembers class *{*;} +-keepattributes * +#strip down debug and verbose logs -assumenosideeffects class android.util.Log { - public static boolean isLoggable(java.lang.String, int); - public static int v(...); - public static int d(...); - public static int i(...); -} + public static *** d(...); + public static *** v(...); +} \ No newline at end of file From 639caf2e8f5048374f53f6a5bde941de491ff836 Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Thu, 19 Sep 2019 19:25:31 +0530 Subject: [PATCH 4/6] version bump up --- ostsdk/gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ostsdk/gradle.properties b/ostsdk/gradle.properties index 487dcfba..2ecc9a1c 100644 --- a/ostsdk/gradle.properties +++ b/ostsdk/gradle.properties @@ -22,9 +22,9 @@ # org.gradle.parallel=true #Increase version when publishing. -VERSION_NAME=2.3.2 +VERSION_NAME=2.3.3-beta.1 #Increase version code when publishing. -VERSION_CODE=36 +VERSION_CODE=37 #Everything else. GROUP=com.ost From b99b19a438f83541375e5add1c3eae1c3c0f6b9f Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Thu, 19 Sep 2019 19:27:08 +0530 Subject: [PATCH 5/6] version change from alpha to beta --- ostsdk/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ostsdk/gradle.properties b/ostsdk/gradle.properties index 2ecc9a1c..79581e72 100644 --- a/ostsdk/gradle.properties +++ b/ostsdk/gradle.properties @@ -22,7 +22,7 @@ # org.gradle.parallel=true #Increase version when publishing. -VERSION_NAME=2.3.3-beta.1 +VERSION_NAME=2.3.3-aplha.1 #Increase version code when publishing. VERSION_CODE=37 From 75c08b6b4165a323a8f0429ccf15c39980ed9a84 Mon Sep 17 00:00:00 2001 From: sachinchauhan Date: Tue, 24 Sep 2019 15:34:34 +0530 Subject: [PATCH 6/6] Version bump up to 38. Change log update. ReadMe update --- CHANGELOG.md | 4 ++++ README.md | 2 +- ostsdk/gradle.properties | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e1f82cd..0a849dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # OST Wallet SDK Changelog +## Version 2.3.3 +### Changes: +* Proguard usage to remove verbose and debug logs. + ## Version 2.3.2 ### Bug Fixes: * Fixed a bug where some android phones were not able to provide pin. diff --git a/README.md b/README.md index 5a517a96..6dfd45a0 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ compileOptions { ``` dependencies { - implementation 'com.ost:ost-wallet-sdk-android:2.3.0' + implementation 'com.ost:ost-wallet-sdk-android:2.3.3' ... ... ... diff --git a/ostsdk/gradle.properties b/ostsdk/gradle.properties index 79581e72..69a89188 100644 --- a/ostsdk/gradle.properties +++ b/ostsdk/gradle.properties @@ -22,9 +22,9 @@ # org.gradle.parallel=true #Increase version when publishing. -VERSION_NAME=2.3.3-aplha.1 +VERSION_NAME=2.3.3 #Increase version code when publishing. -VERSION_CODE=37 +VERSION_CODE=38 #Everything else. GROUP=com.ost