/M

Primary LanguageJava

Android app skeleton

Continuous integration

  • Travis CI Build Status
  • Circle CI Build Status
  • Nevercode CI Nevercode build status
  • Codecov codecov

Prerequisites

What's included:

  • Staging and Production build flavors with different package names (read more)
  • Android Lint configuration
  • Travis CI and CircleCI build script1 script2:
    • Downloading an Android SDK
    • Building
    • Running Android Lint
    • Hook up your continuous deployment target in after_success for travis and in 'deployment' for CircleCi
  • Nevercode CI setup. Nevercode (previously known as GreenhouseCI) created webhooks when you connected to GitHub and will build your app automatically for every git push
  • Release build signing and naming configuration

Setup

  1. Clone application as new project with original remote named "android-base"

    git clone --depth 1 git://github.com/fs/android-base.git --origin android-base [MY-NEW-PROJECT]
    

    Note: we use depth parameter here in order to not copy the history of changes in base project

  2. Create your new repository on the GitHub and push master into it. Make sure master branch is tracking origin repo.

    cd [MY-NEW-PROJECT] git remote add origin git@github.com:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git git push -u origin master

  3. Import the project into your favourite IDE. Just select the root build.gradle and your IDE will do the rest.

Configuration

Codestyles

Project contains default codestyle scheme at ./idea/codestyleSettings.xml. Make sure that you use default project scheme to avoid mess with codestyle with your collegues. Go to the Settings (cmd + ,) -> Editor -> Code Style look on top of right panel and select Project from Scheme dropdown. Apply -> Ok.

Making a release build

  • Uncomment these lines and fill them up with your credentials

ProGuard

Project already has proguard config for included libraries. Maintain proguard-rules.pro updated when you add new libraries or play with reflection.

Credits

Android app skeleton is maintained by Adel Nizamutdinov and Ilya Eremin. It was written by Flatstack with the help of our contributors