Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikialeksey/image-search
Another android app architecture sample
https://github.com/nikialeksey/image-search
android android-app android-application android-sdk jetpack jetpack-android jetpack-lifecycle-components jetpack-navigation jetpack-pagination multimodule mvvm mvvm-android
Last synced: about 1 month ago
JSON representation
Another android app architecture sample
- Host: GitHub
- URL: https://github.com/nikialeksey/image-search
- Owner: nikialeksey
- License: mit
- Created: 2019-12-14T09:58:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T11:03:35.000Z (9 months ago)
- Last Synced: 2024-04-09T14:16:03.184Z (9 months ago)
- Topics: android, android-app, android-application, android-sdk, jetpack, jetpack-android, jetpack-lifecycle-components, jetpack-navigation, jetpack-pagination, multimodule, mvvm, mvvm-android
- Language: Kotlin
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
![build status](https://github.com/nikialeksey/image-search/actions/workflows/workflow.yml/badge.svg)
[![codecov](https://codecov.io/gh/nikialeksey/image-search/branch/master/graph/badge.svg)](https://codecov.io/gh/nikialeksey/image-search)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/nikialeksey/image-search/blob/master/LICENSE)
## How to build and run
### Flickr images
You should create `local.properties` file if you have not yet and add
there `flickr.api.key` field with [flickr api key](https://www.flickr.com/services/api/misc.api_keys.html):```properties
flickr.api.key=
```Then, install it:
```bash
./gradlew installDebug
```### Fake images
```bash
./gradlew installInstrumented
```## Architecture aspects
### Code base conventions
Project uses feature modules approach. Every feature has at least two modules: `api`
module and primary `implementation` module. For example, `images` feature has three
modules:- `api` - API module
- `flickr` - primary implementation
- `fake` - additional implementation with providing images from assets for
testing purposesThere is `app` module which contains entry points for application. There
are several entry points with different code base:- [`debug`](https://github.com/nikialeksey/image-search/blob/master/app/src/debug/java/com/nikialeksey/interview/imagesearch/Application.kt)
with primary code base (flickr images provider)
- [`release`](https://github.com/nikialeksey/image-search/blob/master/app/src/release/java/com/nikialeksey/interview/imagesearch/Application.kt)
with primary code base (flickr images provider)
- [`instrumented`](https://github.com/nikialeksey/image-search/blob/master/app/src/instrumented/java/com/nikialeksey/interview/imagesearch/Application.kt)
entry point without flickr images provider, but with fakes for images
So when you run:
```bash
./gradlew installInstrumented
```
you build and install only the code with `:images:fake` and without `:images:flickr`
module.### Requirements protocol
Project does not use any [`DI` framework](https://en.wikipedia.org/wiki/Dependency_injection#Dependency_injection_frameworks).
When a feature-module needs for external communication, it describes the
requirements in `api` module, and `app` module must implement it in an
entry point, which use the feature.## Thanks
Icons from [flaticon.com](https://www.flaticon.com/packs/multimedia-collection)