GithubHelp home page GithubHelp logo

sundarsan / base_app_android-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from refineriaweb/base_app_android

0.0 1.0 0.0 973 KB

Base skeleton structure to start every new project, based on the design patters suggested by Robert C. Martin (aka Uncle Bob) on his clean architecture.

License: Apache License 2.0

Java 100.00%

base_app_android-1's Introduction

Android Arsenal

Base App Android

Base skeleton structure to start every new project, based on the design patters suggested by Robert C. Martin (aka Uncle Bob) on his clean architecture.

base_app_android is the project which we use at Refineria Web to start any new Android project. It presents a structure of 3 layers, domain, data and presentation; this approach has been chosen with the purpose of creating an application that conducts unit testing and also allow the portability between platforms, mainly iOS.

The project is divided in three modules:

  • domain: java library project. Every test is a unit test and all its dependencies are pure java libraries: dagger 2, rxjava, lombok, junit and mockito.
  • data: java library project. It’s the repository that supplies the data which will be consumed by the domain module. Dependencies: domain module, retrofit 2, dagger 2, rxjava, rxcache, lombok, junit, and mockito.
  • presentation: android app project. It links the two previous modules and implement all the views interfaces defined in domain module. Dependencies: domain and data module, dagger 2, rxAndroid, lombok, butterknife and espresso.

The application implements a minimal example using the Github Api. The purpose is to illustrate in a simple way the natural workflow derived from this kind of architecture, using the classes created in the foundation packages in every one of the 3 layers.

To facility the use of this project as a common base one for any new project, a gradle task called freshStart has been created. This task removes the earlier mentioned minimal example, leaving the appliaction in an optimal state to start any new project.

Just run the next command from any terminal located at the root project:

$ ./gradlew freshStart

After that, build and clean project

Some considerations:

        $ ./gradlew clean build spoon -P classNameTestTuRun=fully.qualified.TestCase
        $ ./gradlew clean build spoon -P classNameTestTuRun=presentation.common.SuiteIntegration
  • To use Gradle Retrolambda Plugin you will need to install JDK 8 and create JAVA8_HOME environment variable. The same for your previous JDK (e.g: JAVA7_HOME). So please make sure that JAVA8_HOME and JAVA7_HOME has been added to the path of the system
    $ nano ~/.bash_profile
	export JAVA8_HOME=/Library/Java/JavaVirtualMachines/jdk8_etc/Contents/Home
	export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk7_etc/Contents/Home
	export PATH=$PATH:$JAVA8_HOME:$JAVA7_HOME

Also, specify in Android Studio the JDK Location pointing to jdk8 /Library/Java/JavaVirtualMachines/jdk8_etc/Contents/Home

base_app_android-1's People

Contributors

miguelbcr avatar victoralbertos avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.