Android Boilerplate

screenshot of Android Boilerplate

Android Boilerplate project using RxJava, Dagger 2, Espresso, Mockito + more!

Overview

The Android Boilerplate is a simple application that showcases the process of downloading, persisting, and syncing data with a common layout used in various Android applications. It is built using various libraries and tools such as Retrofit, OkHttp, Dagger 2, RxJava, RxAndroid, Mockito, and Robolectric. The project provides functional tests with Espresso and unit tests with Mockito and Robolectric.

Features

  • Downloading, persisting, and syncing data: The application demonstrates the process of downloading data from a server, persisting it locally, and keeping it in sync with the server.
  • Common layout: The app showcases a common layout that can be used across different Android applications.
  • Functional tests with Espresso: The project includes functional tests that use Espresso, a popular testing framework for Android.
  • Unit tests with Mockito and Robolectric: The application also includes unit tests that utilize Mockito and Robolectric for testing various components.
  • RxJava and RxAndroid: The project uses RxJava and RxAndroid to handle asynchronous operations and provide reactive programming capabilities.
  • Retrofit and OkHttp: Retrofit and OkHttp are used for making HTTP requests and handling network operations.
  • Dagger 2: The application utilizes Dagger 2, a dependency injection framework, for managing dependencies.
  • Butterknife: Butterknife is used for view binding, reducing boilerplate code for accessing views in the layout.
  • Timber: Timber, a logging library by Jake Wharton, is integrated into the project for convenient logging.

Installation

To build, install, and run a debug version of the Android Boilerplate application, follow these steps:

  1. Make sure you have the following requirements installed:

    • Android SDK
    • Android SDK Tools
    • Android SDK Build Tools 23.0.2
    • Android Support Repository
    • Android Support Library
    • Android 6.0 (API 23)
  2. Clone the project repository to your local machine.

  3. From the root of the project, run the following command to build, install, and run the debug version:

    ./gradlew installDebug
    

Summary

The Android Boilerplate is a simple application that serves as a starting point for Android developers. It showcases key features such as downloading, persisting, and syncing data, along with unit and functional testing. The project utilizes popular libraries like Retrofit, OkHttp, RxJava, Dagger 2, Butterknife, and Timber to provide a robust and efficient development environment. By following the installation guide, developers can easily set up the project and start building their own Android applications.