All Projects → viniciussoares → Ribot Android Boilerplate Kotlin

viniciussoares / Ribot Android Boilerplate Kotlin

Licence: apache-2.0
Kotlin version of android boilerplate app that showcases architecture and libraries used at ribot http://ribot.co.uk

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Ribot Android Boilerplate Kotlin

Kotlin Modular Tdd Coroutines Mvvm
A sample Kotlin app which was built with modular structure, Kotlin DSL, Kotlin Coroutines, TDD and MVVM patterns.
Stars: ✭ 256 (+201.18%)
Mutual labels:  dagger2, architecture
Newspaper
An aggregated newspaper app containing news from 10+ local news publishers in Hong Kong. Made with ❤
Stars: ✭ 82 (-3.53%)
Mutual labels:  dagger2, mockito
Avenging
MVP pattern example on Android: no Dagger or RxJava example
Stars: ✭ 279 (+228.24%)
Mutual labels:  architecture, mockito
Debt-Manager
A personal app to store people that owe you money or you owe money to. "Mo Money Mo Problems" 🎵 - The Notorious B.I.G. 😎
Stars: ✭ 22 (-74.12%)
Mutual labels:  mockito, dagger2
Mockstar
Demo project on How to be a Mockstar using Mockito and MockWebServer.
Stars: ✭ 53 (-37.65%)
Mutual labels:  dagger2, mockito
AndroidMVPArchitecture
Android MVP architecture sample project with or without RxJava and Dagger2 and Kotlin
Stars: ✭ 78 (-8.24%)
Mutual labels:  mockito, dagger2
Wanandroid
🏄 基于Architecture Components dependencies (Lifecycles,LiveData,ViewModel,Room)构建的WanAndroid开源项目。 你值得拥有的MVVM快速开发框架:https://github.com/jenly1314/MVVMFrame
Stars: ✭ 410 (+382.35%)
Mutual labels:  dagger2, architecture
MoviesApp
A Movie Application uses TheMovie API, MVVM architecture and all jetpack components.
Stars: ✭ 100 (+17.65%)
Mutual labels:  mockito, dagger2
Star Wars Shop
Simple project with clean architecture and android lifecycle
Stars: ✭ 37 (-56.47%)
Mutual labels:  dagger2, mockito
Android Kotlin Boilerplate
This project demonstrates Android Architecture Components (Viewodel, Livedata) and Dagger for dependency Injection in Kotlin
Stars: ✭ 28 (-67.06%)
Mutual labels:  dagger2, architecture
movie-booking
An example for booking movie seat, combined of Android Data Binding, State Design Pattern and Multibinding + Autofactory. iOS version is: https://github.com/lizhiquan/MovieBooking
Stars: ✭ 80 (-5.88%)
Mutual labels:  architecture, dagger2
Githubprojectbrowser
This is a sample Android Project that is based on Clean Architecture
Stars: ✭ 64 (-24.71%)
Mutual labels:  dagger2, mockito
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (-42.35%)
Mutual labels:  mockito, dagger2
rxify
Now: RxJava Playground, Previous: Demo for the talk at DroidconIN 2016, Droidcon Boston 2017 and Codelab for GDG January Meetup
Stars: ✭ 59 (-30.59%)
Mutual labels:  mockito, dagger2
Weather-Guru-MVP
Sample Material-design Android weather application build with MVP architectural approach using Dagger2, RxJava2, Retrofit2, Event-Bus, GreenDao, Butterknife, Lottie etc.
Stars: ✭ 15 (-82.35%)
Mutual labels:  mockito, dagger2
Tvflix
TvFlix android app using Dagger Hilt, Coroutines, Flow, KTX, Jetpack(Room, ViewModel, Paging3, Lifecycle) based on MVVM architecture purely written in Kotlin
Stars: ✭ 286 (+236.47%)
Mutual labels:  dagger2, mockito
TDDWeatherApp
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Stars: ✭ 38 (-55.29%)
Mutual labels:  mockito, dagger2
GuildWars2 APIViewer
Guild Wars 2 API Viewer: An Android application used for viewing various Guild Wars 2 API endpoint responses. Developed utilizing MVVM architecture, in conjunction with Databinding, Dagger 2, Retrofit 2, and RxJava 2.
Stars: ✭ 53 (-37.65%)
Mutual labels:  mockito, dagger2
Android Starter
[Android Architecture] Android starter based on MVP/Dagger2/RxJava2/Robolectric/Espresso/Mockito. It provides a generator to fast create a Android template project.
Stars: ✭ 522 (+514.12%)
Mutual labels:  architecture, mockito
Android tmdb clean architecture
Showcase of clean architecture concepts along with Continuous Integration and Development for modular Android applications. Includes test suits (functional and unit tests) along with code coverage.
Stars: ✭ 63 (-25.88%)
Mutual labels:  dagger2, mockito

Android Boilerplate Kotlin

Ribot Sample Android app rewritten using Kotlin. It demonstrates the architecture, tools and guidelines that they use when developing for the Android platform (https://github.com/ribot/android-guidelines)

DISCLAIMER: This is not an official Ribot repository.

Libraries and tools included:

Requirements

TODO

  • Functional Tests (Waiting dexmaker support for mockito 2.x)
  • Static code analysis

Architecture

This project follows ribot's Android architecture guidelines that are based on MVP (Model View Presenter). Read more about them here.

How to implement a new screen following MVP

Imagine you have to implement a sign in screen.

  1. Create a new package under ui called signin
  2. Create an new Activity called ActivitySignIn. You could also use a Fragment.
  3. Define the view interface that your Activity is going to implement. Create a new interface called SignInMvpView that extends MvpView. Add the methods that you think will be necessary, e.g. showSignInSuccessful()
  4. Create a SignInPresenter class that extends BasePresenter<SignInMvpView>
  5. Implement the methods in SignInPresenter that your Activity requires to perform the necessary actions, e.g. signIn(String email). Once the sign in action finishes you should call getMvpView().showSignInSuccessful().
  6. Create a SignInPresenterTestand write unit tests for signIn(email). Remember to mock the SignInMvpView and also the DataManager.
  7. Make your ActivitySignIn implement SignInMvpView and implement the required methods like showSignInSuccessful()
  8. In your activity, inject a new instance of SignInPresenter and call presenter.attachView(this) from onCreate and presenter.detachView() from onDestroy(). Also, set up a click listener in your button that calls presenter.signIn(email).

Code Quality

This project integrates a combination of unit tests, functional test and code analysis tools.

Tests

To run unit tests on your machine:

./gradlew test

To run functional tests on connected devices:

./gradlew connectedAndroidTest

Note: For Android Studio to use syntax highlighting for Automated tests and Unit tests you must switch the Build Variant to the desired mode.

New project setup

To quickly start a new project from this boilerplate follow the next steps:

  • Download this repository as a zip.
  • Change the package name.
    • Rename packages in main, androidTest and test using Android Studio.
    • In app/build.gradle file, packageName and testInstrumentationRunner.
    • In src/main/AndroidManifest.xml and src/debug/AndroidManifest.xml.
  • Create a new git repository, see GitHub tutorial.
  • Replace the example code with your app code following the same architecture.
  • In app/build.gradle add the signing config to enable release versions.
  • Add Fabric API key and secret to fabric.properties and uncomment Fabric plugin set up in app/build.gradle
  • Update proguard-rules.pro to keep models (see TODO in file) and add extra rules to file if needed.
  • Update README with information relevant to the new project.
  • Update LICENSE to match the requirements of the new project.

License

    Copyright 2015 Ribot Ltd.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].