##Prerequisites
- JDK 8
JAVA_HOME
pointing to your jdk8ANDROID_HOME
pointing 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
Exception
logging (read more) - Java 8 lambdas support and configuratiuon (read more)
- Robolectric support and configuration (read more)
- Dagger configuration (read more):
Application
subclass with an application-wide scopeActivity
subclass with configured UI-wide scope and a rootFragment
ScopedFragment
forFragment
-wide scopes
- Default
Menu
with SettingsMenuItem
Preferences
interface for theSharedPreferences
boilerplate reduction (using Esperandro)PreferenceFragment
with 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
apikey
is not specified. Also, gettingapikey
without 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 [email protected]:[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.gradle
and 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
Android app skeleton is maintained by Adel Nizamutdinov. It was written by Flatstack with the help of our contributors