Giter Site home page Giter Site logo

android_scaffold's Introduction

Setup

  • Configure the flavor to mockDebug for development
  • Configure the flavor to cloudDebug for using internet with real data

Running UI tests with Espresso

Running UI tests with only the mock flavor will ensure consistent. Plus, you don't need the server to be online ;)

./gradlew connectedMockDebugAndroidTest

Architecture

Flavors

  • There is a flavor dimension "api", with the possible values being mock, cloud.
  • The mock flavor is especially useful since it feeds the UI with static preconfigured data during development time even if TDD is not followed, which allows the developer to exercise the UI with all the edge cases. If espresso is also supported it's the recommended flavor, because of its predictability.
  • The cloud flavor means that data will be obtained using Retrofit from somewhere in the cloud.

Flavor configuration

Environment variables such as server url are configured through buildSrc/src/main/kotlin/Environment.kt

Java packages convention

  • This app is packaged by feature. What it means is that if it has a feature called login and another called landing the following tree is expected:
ui
 | 
 \ login
 \ landing
 \ common
domain
 |
 \ login
 \ landing
 \ common 
utils 

ui.common is a place for generic code shared among different feature

Which is an advantage once the app has over 20 activities and presenters.

TODO

  • Configure retrofit interceptor to inspect network traffic in debug mode
  • Proguard, R8, D8 not configured
  • For release builds, configure cleartext as allowed
  • For release builds, set up signing key properly

android_scaffold's People

Contributors

fmatosqg avatar

Watchers

 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.