Code Monkey home page Code Monkey logo

android-gradle-java-app-template's Introduction

Android Gradle Java App Template

License TravisCI OSX Build Coveralls Code Coverage Twitter Follow

Gradle + Android Studio + Robolectric + Espresso + Mockito + EasyMock/PowerMock + JaCoCo

Technologies used:

Build Tools:

Name Description
Gradle Gradle build system
Android Gradle Build Tools Official Gradle Plugin
Android SDK Official SDK
Android SDK Build Tools Official Build Tools
Android Studio or Official IDE
Intellij Intellij IDE

####Android Libraries:

Name Description
Android Support-v4 Support Library API 4+
Android AppCompat-v7 Support Library API 7+

####Testing Frameworks:

Name Description
Espresso Instrumentation Framework
Robolectric Unit Testing Framework

####Reporting Plugins:

Name Description
JaCoCo JaCoCo Test Coverage
Coveralls Hosts test reports published from TravisCI

####Continuous Integration:

Name Description
TravisCI Build Server(Builds, Tests, Publishes reports to Coveralls)

####Publishing to Google Play:

Name Description
Gradle-play-publisher Publishes your app to Google Play

Getting Started:

Android Studio or Intellij Support(Simple):

  • Import/Open this project with Android Studio/Intellij(click on build.gradle)

  • Instrumentation Tests:

  • Change the Build Variant Test Artifact to Instrumentation Tests

  • Right click an instrumentation test located in src/main/androidTest and click test

  • Unit Tests:

  • Change the Build Variant Test Artifact to Unit Tests

  • Right click a unit test located in src/main/test and click test

Building and Running

This project builds with Gradle and the Android Build tools.

Build the APK:

$ gradlew assembleDebug

Install the APK:

$ gradlew installDebug

Run the App:

$ gradlew runDebug

Testing

Running the Unit Tests:

The Junit and Robolectric tests run on the JVM, no need for emulators or real devices.

$ gradlew testDebug

Run a single unit test in the debug flavor:

$ gradlew testDebug --tests="*MainActivityTest*"

Running the Instrumentation Tests:

The Espresso instrumentation tests run on the device.

$ gradlew connectedDebugAndroidTest

Reports

Generate Lint Reports:

The Lint plugin generates reports based off the source code.

$ gradlew lintDebug

Generate Jacoco Test Coverage:

The Jacoco plugin generates coverage reports based off the unit tests.

$ gradlew jacocoDebugReport

android-gradle-java-app-template's People

Contributors

jaredsburrows 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.