An app to make it easier to save information of your loved movies
Before you try to run this project you should go to OMDB API KEY to generate you own key. Place the key on your root local.properties file like omdbApiKey=${your_key}. I´ve made a gradle plugin to secure the key using NDK and JNI calls of C++ code. Because of that I dont have to add the key to github and I can avoid decompiling security leaks. Check the plugin here: gradle-secretkey-plugin
https://trello.com/b/TNCSKgUT/moviedb
The code is organized using a Clean Architecture with MVVM architecture for the presentation layer. The implementation was heavily based on the articles and projects of Fernando Cejas:
- Article: https://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/
- Project: https://github.com/android10/Android-CleanArchitecture
A brief description:
- domain: Business rules and interfaces on how to interact with services and repositories.
- presentation: Logic that connects the business rules with the UI. Manipulation of data for view.
- data: Implementations of services and repositories.
Ci check is configured as mandatory for all pull requests.
./gradlew check
runs checkstyle for the code to ensure that the code style guidelines are being used.
As alternative to MVP, MVVM takes advantage of the reactive programming to decrease the coupling between the presentation and the business layer. In that case the same viewModel could be used in many screens. Check this presentation I´ve made about it some time ago: MVVM - Presentation
Yes, thats why that architecture was chosen in the first place. But given the time I had to make the whole project, I´ve made one test for each layer(junit).
Because every implementation is made using interfaces, its easy to create the inversion of control using dagger. I had enough time to implement it using kakao library and by creating a custom implementation of AndroidJUnitRunner that serves a mocked implementation of dagger. There is a test for the search movie by title. check it out!
./gradlew jacocoRootReport
runs unit tests with jacoco and creates a merged coverage report on your rootProject build dir for junit and instrumentation tests. (Please make sure you have a phone or emulator attached before running this command)
License This project is licensed under the MIT License - see the LICENSE file for details