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/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/gradle.properties b/ostsdk/gradle.properties index 487dcfba..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.2 +VERSION_NAME=2.3.3 #Increase version code when publishing. -VERSION_CODE=36 +VERSION_CODE=38 #Everything else. GROUP=com.ost diff --git a/ostsdk/proguard-android-optimize.txt b/ostsdk/proguard-android-optimize.txt new file mode 100644 index 00000000..54ebd824 --- /dev/null +++ b/ostsdk/proguard-android-optimize.txt @@ -0,0 +1,4 @@ +#Don't do arithmetic and variable simplification +-optimizations !code/simplification/arithmetic,!code/allocation/variable +#Number of Optimization passes +-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