Skip to content

Commit

Permalink
Disable d8 and some optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
mopsalarm committed Aug 21, 2017
1 parent 4df723f commit 87be23a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
aaptOptions {
// See https://www.reddit.com/r/androiddev/comments/47ni7v/if_you_support_older_versions_of_android_there_is/
additionalParameters "--no-version-vectors"
cruncherEnabled = false
cruncherEnabled = true
}

sourceSets.main {
Expand Down
1 change: 1 addition & 0 deletions app/proguard-rules-debug.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

-dontobfuscate
-dontoptimize
-dontpreverify

-keep class com.pr0gramm.app.** { *; }
4 changes: 2 additions & 2 deletions app/proguard-rules-release.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-dontskipnonpubliclibraryclassmembers

-optimizationpasses 10
-optimizations field/marking/private,!method/removal/parameter,method/marking/static,method/inlining/*,!field/*,code/simplification/*,class/merging/vertical,!class/merging/horizontal
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,method/inlining/*,code/simplification/*,class/merging/vertical,!class/merging/horizontal,!method/removal/parameter


# remove all not so important logging
Expand All @@ -21,4 +21,4 @@

-keepclassmembers class **$WhenMappings {
<fields>;
}
}
7 changes: 6 additions & 1 deletion app/src/main/java/com/pr0gramm/app/util/ErrorFormatting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.pr0gramm.app.R
import com.pr0gramm.app.api.pr0gramm.HttpErrorException
import com.pr0gramm.app.api.pr0gramm.LoginCookieHandler
import com.pr0gramm.app.ui.PermissionHelper
import org.slf4j.LoggerFactory
import java.io.EOFException
import java.io.FileNotFoundException
import java.io.IOException
Expand Down Expand Up @@ -38,7 +39,11 @@ object ErrorFormatting {
* Gets the message for the given exception. You must only call this,
* if [.handles] returned true before.
*/
fun getMessage(context: Context, thr: Throwable): String = message(thr, context)
fun getMessage(context: Context, thr: Throwable): String {
LoggerFactory.getLogger("ErrorFormatting").info("Formatting error:", thr)

return message(thr, context)
}

/**
* Returns true, if this exception should be logged
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx1536m -XX:+UseG1GC -XX:+UseStringDeduplication
android.enableD8=true

# android.enableD8=true

0 comments on commit 87be23a

Please sign in to comment.