Description
Multi-module demo app that gets data from a Dota2 api.
List to Detail screen
Filtering
Module Design
Module name | Type | Description |
---|---|---|
app | Android Application | MainActivity, BaseApplication, Theme, Hilt setup. |
core | Java/Kotlin Library | Core business models and classes. |
hero-datasource | Java/Kotlin Library | Data-sources (network and cache) for the hero Module. |
hero-datasource-test | Java/Kotlin Library | Data-source test fakes. These are contained in their own module so they can be used in tests in other modules. |
hero-domain | Java/Kotlin Library | Domain models and classes for the hero Module. |
hero-interactors | Java/Kotlin Library | Use-cases for the hero Module. |
ui-heroList | Android Library | UI components for the HeroList screen. |
ui-heroDetail | Android Library | UI components for the HeroDetail screen. |
constants | Java/Kotlin Library | Random constants. |
components | Android Library | Common Composables. |
Architecture
Tests
Unit Tests
I wrote unit tests for every use-case.
Compose UI Tests
build.gradle files
There are 3 types of build.gradle files.
- android application (app module)
- android-library-build.gradle
- Android module that contains ui components.
- library-build.gradle
- Pure java/kotlin library.
API
Hero Stats (GET)
https://api.opendota.com/api/heroStats
Known issues
- HeroListFilter.kt
- Changing the filter does not rebuild the dialog with the correct size.