Every serious project should intently think about its structure, architecture, and management of dependencies within the project features and modules. In the world of Android, Dagger is definitely the most popular framework and tool every developer uses for this purpose. But Dagger, with all its benefits, also has a lot of quirks which sometimes make the job more complex and difficult, and it could also introduce a pile of boilerplate code, just to set up.
Let’s look at how we can use Retrofit’s CallAdapter API to nerf down these edges. We’ll use Sealed Classes to represent the result of network calls and build error body deserialization into Retrofit.
With the recently released version 5.1, Gradle has added a great, subtle new feature that lets you specify which dependencies should be pulled from which repositories. To explain what this is, let’s start with the default behavior.
In this article, multiple types of synchronization, locking and thread-safety in Java and Kotlin work are explained through interactive examples.
Start embracing what makes your system yours and fix it up, not by removing all its flaws but by working around them and bathing them in gold! I know it sounds weird; I’m basically suggesting what we call a Lava Flow, but hear me out! Let our solution around the anti-pattern be a thing of beauty. Everyone will look at your elegant solution, and never even consider the anti-pattern it’s working around.