App created in compose that displays Marvel heroes using the marvel api
This app uses MVVM but trying to follow the Recommended app architecture at the same time.
The project files can be found at https://github.com/jeprubio/marvel-compose/
Easiest and simple way to download code from Github is to download the whole code in a zip file by clicking the "Code" / "Download Zip" button on the right hand side of the page.
You can then save the zip file into a convenient location on your computer and start working on it.
Another way to get the code is using git:
git clone [email protected]:jeprubio/marvel-compose.git
Android studio should be installed in order to run the app.
Follow the instructions at https://developer.android.com/studio/install depending on which SO your computer is running.
Open the code in android studio.
Edit the local.properties
file adding a value for MARVEL_PRIVATE_KEY
and MARVEL_PUBLIC_KEY
. E.g.:
MARVEL_PRIVATE_KEY=1234567890abcdef1234567890abcdef12345678
MARVEL_PUBLIC_KEY=abcdefghijklmnopqrstuvwxyz123456
Wait until gradle finishes and press the play button.
To run the unit tests: ./gradlew lint testDebug --continue
To run the UI tests: ./gradlew connectedDebugAndroidTest
To record the screenshots test: ./gradlew executeScreenshotTests -Precord
To execute the screenshots test: ./gradlew executeScreenshotTests
-
Timber - Library to perform logging.
-
Gson - To parse from and to json (configured retrofit to use it).
-
Retrofit - To perform API calls and parse the response.
-
Dagger-Hilt - For dependency injection.
-
Coil - Loading and caching images.
-
Junit5 - For writing tests.
-
Mockk - A mocking library similar to mockito that allows you to mock suspend functions.
-
kotlinx-coroutines-test - It has test utilities for working with coroutines.
-
Espresso - e2e tests
-
Compose UI testing - Compose UI tests
-
Shot - Screenshot tests