##Prerequisites
- JDK 8
JAVA_HOMEpointing to your jdk8ANDROID_HOMEpointing to your android-sdk
##Plugins for Android Studio for comfortable work
##What's included:
- Staging and Production build flavors with different package names (read more)
- Logger configuration supporting
Exceptionlogging (read more) - Java 8 lambdas support and configuratiuon (read more)
- Robolectric support and configuration (read more)
- Dagger configuration (read more):
Applicationsubclass with an application-wide scopeActivitysubclass with configured UI-wide scope and a rootFragmentScopedFragmentforFragment-wide scopes
- Default
Menuwith SettingsMenuItem Preferencesinterface for theSharedPreferencesboilerplate reduction (using Esperandro)PreferenceFragmentwith default Preferences xml added to aMainFragment's SettingsMenuItem- Android Lint configuration
- Travis CI build script:
- Downloading an Android SDK
- Building
- Running Android Lint
- Running Robolectric tests
- Hook up your continuous deployment target in
after_success
- Release build signing and naming configuration
##What's not included
- Crashlytics: they live in their own world, and including their plugin in template project just fails the build, if
apikeyis not specified. Also, gettingapikeywithout an IDE plugin is impossible. You can get it here - Test coverage: still in the process of figuring out what's the best way to enable unit test coverage for Android with Robolectric. Any suggestions will be highly appreciated
##Setup
-
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
-
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 -
Import the project into your favourite IDE (only Android Studio and IntelliJ IDEA 13 are supported at the moment). Just select the root
build.gradleand your IDE will do the rest. It will ask you to change the language level - do it, we're using Java 8 now
###Configuration
- Change your app's package by either renaming the folder structure for Java sources or by just changing this constant in
build.gradle
###Making a release build
- Just uncomment these lines and fill them up with your credentials
##Notes on ProGuarding
TODO
Credits
Android app skeleton is maintained by Adel Nizamutdinov. It was written by Flatstack with the help of our contributors
