-
-
Notifications
You must be signed in to change notification settings - Fork 47
Debug Tools
Type | Name |
---|---|
Logs | Timber |
HTTP requests | Chuck |
Database Inspector | Stetho |
Dependencies version | Gradle versions plugin |
Log Unit Tests | Gradle test logger plugin |
Don't forget to remove your debug logs on your application in production. You probably already know this library, if it's not the case I strongly invite you to use it.
Chuck is a simple in-app HTTP inspector for Android OkHttp clients. Chuck intercepts and persists all HTTP requests and responses inside your application. It also provides UI for inspecting their content.
![](https://github.com/lopspower/CleanRxArchitecture/raw/master/preview/chuck.gif)
Stetho is a powerful library created by Facebook with many tools. I mainly use it when I need to analyze the database.
To do this, inspect your device on chrome with the following link: chrome://inspect/#devices
![](https://github.com/lopspower/CleanRxArchitecture/raw/master/preview/stetho.png)
However, since version 4.1 of Android Studio we are lucky to have a Database Inspector tool directly integrated into the IDE which allows us to do the same but more easily:
![](https://github.com/lopspower/CleanRxArchitecture/raw/master/preview/database_inspector.png)
Plugin Gradle versions:
This is probably the plugin I use the most. It allows in a command line to check that the libraries currently used in the application are up to date.
./gradlew dependencyUpdates
![](https://github.com/lopspower/CleanRxArchitecture/raw/master/preview/gradle_deps_plugin.png)
You can also configure the update strategy to keep only release versions this way:
dependencyUpdatesStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
Plugin Gradle test logger:
Last but not least, this plugin improves the display of your unit test results.
It is very practical especially when you have to analyze the results in CI.
![](https://github.com/lopspower/CleanRxArchitecture/raw/master/preview/gradle_test_logger.png)
Find this project useful? Support it by joining stargazers for this repository ⭐️
And follow me for my next creations 👍
CleanRxArchitecture by Lopez Mikhael is licensed under a Apache License 2.0.