Skip to content

Surkhojb/android-template

This branch is up to date with DiUS/android-template:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cee9a90 · Jul 9, 2014

History

19 Commits
Jul 2, 2014
Jun 29, 2014
Jun 28, 2014
Jun 29, 2014
Jun 26, 2014
Jun 29, 2014
Jun 26, 2014
Jul 9, 2014
Jul 2, 2014
Jun 26, 2014
Jun 26, 2014
Jun 28, 2014

Repository files navigation

android-template

Build Status

An android template project with the following:

  • Spock unit testing
  • Junit unit tests
  • Robospock/Roboelectric unit tests
  • Jacoco code coverage report
  • Checkstyle

Fork it and save time on iteration zero!

Prerequisites

  • Android studio 0.8.1 preview or later
  • ANDROID_HOME variable is set.

getting started

  • Fork or clone this repo
  • Run the following to pull in all external dependencies:
./graldew clean build
  • Import the project into android studio: File >> Open >> ..../android-template/build.gradle
  • Rename the application id/package in /app/build.gradle
ext{
  projectPackageName = "au.com.dius.android.template"
}
  • Refactor the existing classes packaging to match your application or Delete everything under app/src and run ./gradlew createJvmSrcDirs -i to recreate src dirs and packages

Adding build flavours/buildTypes

When adding new flavours of build types the following command will automatically create the source and res directories.

./gradlew app:createJvmSrcDirs -i

Build and run all tests

  • Runs both instrumented tests within 'app' and all unit tests in the unit-test project
./gradlew clean build -i

Unit Testing

The 'unit-test' module facilitates for unit testing without an emulator (non-connected). 'Connected` unit tests should live under /app/src/androidTest. see: Here "This can contain unit tests, instrumentation tests, and later uiautomator tests"

Unit Tests

./gradlew :unit-test:test

Coverage

  • After unit tests have been executed
./gradlew jacocoTestReport

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 76.9%
  • Java 23.1%