Skip to content

Commit

Permalink
Disable all kinds of logging on release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Jun 12, 2017
1 parent 30ee926 commit 0aaa7d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
10 changes: 10 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@
@android.support.annotation.Keep <init>(...);
}

# Remove all kinds of logging.
-assumenosideeffects class android.util.Log {
public static int d(...);
public static int v(...);
public static int i(...);
public static int w(...);
public static int e(...);
public static int wtf(...);
}

# EventBus
-keep enum org.greenrobot.eventbus.ThreadMode { *; }

Expand Down
18 changes: 10 additions & 8 deletions app/src/main/kotlin/me/proxer/app/application/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ class MainApplication : Application() {
OkHttpDataSourceFactory(client, GENERIC_USER_AGENT, listener)
})

JobManager.create(this).addJobCreator {
when {
it == ChatJob.TAG -> ChatJob()
it == NotificationsJob.TAG -> NotificationsJob()
it.startsWith(LocalMangaJob.TAG) -> LocalMangaJob()
else -> null
}
}
JobManager.create(this)
.apply { config.isVerbose = BuildConfig.DEBUG }
.addJobCreator {
when {
it == ChatJob.TAG -> ChatJob()
it == NotificationsJob.TAG -> NotificationsJob()
it.startsWith(LocalMangaJob.TAG) -> LocalMangaJob()
else -> null
}
}

DrawerImageLoader.init(ConcreteDrawerImageLoader())
}
Expand Down

0 comments on commit 0aaa7d5

Please sign in to comment.