• Stars
    star
    589
  • Rank 75,909 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Android Gradle Java App Template

License Build 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

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

More Repositories

1

android-gif-search

Gif LazyVerticalGrid MVVM using Dagger 2 + Hilt with Retrofit 2, Moshi, Kotlin Coroutines, JUnit, Espresso and Robolectric tests!
Kotlin
393
star
2

gradle-license-plugin

Gradle plugin that provides a task to generate a HTML license report of your project.
Groovy
345
star
3

open-quartz

Google Glass Development - GDK + SDK
Java
211
star
4

rarcrack

Rarcrack - port for Mac OSX (works on Linux and Mac OSX)
C
181
star
5

gradle-spoon-plugin

Gradle plugin that provides a task to run Android instrumentation tests via Spoon.
Groovy
123
star
6

android-bloatware

Keeping tracking of Bloatware that is safe to disable.
Shell
89
star
7

android-gradle-kotlin-app-template

Gradle + Android Studio + Robolectric + Espresso + JaCoCo
Kotlin
81
star
8

cs-interview-questions

Personal Solutions to Interview Questions
Java
62
star
9

android-gradle-groovy-app-template

Gradle + Android Studio + Robolectric + Espresso + RoboSpock + JaCoCo
Groovy
40
star
10

assembly-example

Common Functions and Code written in Assembly Language
Assembly
32
star
11

retrofit2-synchronous-adapter

This adapter allows synchronous return types for Retrofit 2.
Java
30
star
12

android-gradle-java-multi-module-template

Static analysis tools: PMD, Findbugs, Checkstyle, Lint and Jacoco on multi module build with an Android app module, Android library module and a Java module
Java
30
star
13

android-gradle-java-library-template

Android Gradle Library Template
Java
23
star
14

android-bazel-java-app-template

Gradle + Android Studio + Robolectric + Espresso + Mockito + EasyMock/PowerMock + JaCoCo
Java
17
star
15

open-virus

Open Source Virus Development
Shell
14
star
16

gradle-checker-framework-plugin

Gradle plugin to use the Checker Framework for Java.
Groovy
9
star
17

ios-gradle-objc-app-template

Gradle + Xcode + XCtest
Objective-C
5
star
18

ios-gradle-swift-app-template

Gradle + Xcode + XCtest
Swift
5
star
19

xml-rpcpp

XmlRpc++ - port for Mac OSX (works on Linux, Mac OSX and Windows) - http://sourceforge.net/projects/xmlrpcpp/
C++
4
star
20

flutter-app-template

Flutter App Template
Dart
3
star
21

jaredsburrows.com

Personal website
HTML
3
star
22

burrowsapps.com

Burrows Applications website
HTML
3
star
23

msp-430

Here are some examples of how to use the MSP430
C
3
star
24

gradle-ios-plugin

Gradle plugin for iOS mobile development
Groovy
3
star
25

gradle-versions-downloader

Download previous of Gradle for cache
Shell
2
star
26

bluetooth-controller

Android Bluetooth with Arduino
Java
2
star
27

hello-world

Hello world in multiple languages.
Assembly
2
star
28

android-gradle-publish-example

TBD
Kotlin
2
star
29

cplusplus-cmake-template

CMake + Boost + Protobuf + GTest + GMock
C++
2
star
30

finance-api

Finance API
Java
1
star
31

dot-files

Development Dot Files
Vim Script
1
star
32

flutter-gif-search

Flutter Gif Search
Dart
1
star
33

flutter-app-firebase

Dart
1
star
34

ci-droid

Java
1
star
35

android-login-example

Basic Android login to PHP + MySQL server, written a while ago for a demo
Java
1
star
36

flutter-app-playground

A playground for Flutter.
Dart
1
star