This repository contains sample code.
Its purpose being, to quickly demonstrate Android, Kotlin and software development in general. More so and amongst others, the main focus of this project is:
- Setup and Gradle configuration,
- Gradle modules,
- Clean architecture,
- Clean code,
- Best practices,
- Testing and
- All those other must know goodies.
Below is a list of skills that are showcased:
- Architectural Pattern
- Clean Architecture
(By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details, such as databases and frameworks. That way, the application becomes easy to maintain and flexible to change. It also becomes intrinsically testable.)
- MVVM
(Model View ViewModel)
- ViewModel
(Architecture Components ViewModel Class)
- LiveData
(Architecture Components LiveData Class)
- Clean Architecture
- Libraries
- Dagger
(A fast dependency injector for Android and Java)
- RxJava
(RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM)
- Retrofit
(Type-safe HTTP client for Android and Java by Square, Inc.)
- GSON
(A Java serialization/deserialization library to convert Java Objects into JSON and back)
- Glide
(An image loading and caching library for Android focused on smooth scrolling)
- Dart
(Extras binding and intent builders for Android apps)
- Timber
(A logger with a small, extensible API which provides utility on top of Android's normal Log class)
- Dagger
- Android Support
- Constraint Layout
(A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way)
- Card View
(A FrameLayout with a rounded corner background and shadow)
- Recycler View
(A flexible view for providing a limited window into a large data set)
- Shared Element Transitions
(Activity transitions in material design apps provide visual connections between different states through motion and transformations between common elements)
- Constraint Layout
- Code Quality
- Android Lint
(The lint tool checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization)
- Detekt
(Static code analysis for Kotlin)
- Android Lint
- Tests
- JUnit
(A programmer-oriented testing framework for Java)
- AssertJ
(AssertJ is a library providing easy to use rich typed assertions)
- Mockito Kotlin
(Using Mockito with Kotlin)
- Robolectric
(Android Unit Testing Framework)
- JUnit
- Debug
- LeakCanary
(A memory leak detection library for Android and Java)
- Strict Mode
(StrictMode is a developer tool which detects things you might be doing by accident and brings them to your attention so you can fix them)
- LeakCanary
- Plugin
- Gradle Versions
(Gradle plugin to discover dependency updates)
- Dexcount Gradle
(A Gradle plugin to report the number of method references in your APK on every build)
- Gradle Versions
Use the below command to build the project in order to install it on an Android device for demonstration:
gradlew clean build -x check
Or faster yet and targeting a specific build type (in our case the debug build type):
gradlew clean assembleDebug
Open an emulator or connect a physical device to experiment with the sample app, use the below command, which first uninstalls and then installs the sample app:
gradlew uninstallDebug | gradlew installDebug
Or faster yet and targeting a specific device (in our case an emulator):
adb -s emulator-5554 uninstall io.petros.github |
adb -s emulator-5554 install presentation\build\outputs\apk\debug\presentation-debug.apk
Use this command in order to run the static code analysis for the project:
gradlew check -x test
Or even run the below commands to run a specific code quality tool in isolation:
gradlew lintDebug
gradlew detektCheck
Run the project unit tests using this command (this includes Robolectric):
gradlew test
Or even run the below commands to run specific tests (per module):
gradlew domain:test
gradlew data:testDebugUnitTest
gradlew presentation:testDebugUnitTest
Below is a list of all those future goodies that can further help demonstrate additional skills:
- Espresso tests (preferable with the Robot pattern). See
MET
comment which stands forMissing Espresso Tests
- Integration tests (preferable with MockWebServer). See
MIT
comment which stands forMissing Integration Tests
- Pagination for infinite scrolling through all the possible results.
- Smaller and larger screens considerations.
- Lifecycle edge case events.
THANK YOU