+
Skip to content

Rwothoromo/DevFinder

Repository files navigation

DevFinder

CircleCI Test Coverage Maintainability

This Android application retrieves a listing of Developers by Location using the Github API and allows you to share their profiles. Download it on Amazon or Google Play.

Design

The design mockup is for the following pages:

1. Developers list. 2. Developer profile. 3. Share profile.
Developers list image Developer profile image Share profile image

Try out the interactive design.

The design was based off Material Design and created using Adobe XD, a free and effective tool that also allows publishing one's design as well as testing the design with ease on a Smart Phone.

Project setup

These instructions will guide you on how to set up this Android project on your local machine.

Prerequisites

Installation

Clone this repository by running the following command in your terminal:

$ git clone https://github.com/Rwothoromo/Android-Codelab.git

Open and run the project in Android Studio

  • Start Android Studio and select Open project then browse this project at path-to-project/Android-Codelab.
  • Send in a request for google-services.json and add the file received to app/google-services.json, app/src/mock/google-services.json and app/src/prod/google-services.json.
  • Send in a request for keystore.jks, alias and passwords, and add the file received to keystores/keystore.jks.
  • Wait for the project to complete building and indexing.
  • Go to Run in the menu and select Run to run the project on an emulator or your connected Android device.
  • For Circle CI, refer to Android Config Blog.
  • When running Instrumented Tests, ensure that in the developer options of the device/emulator,
    • that you have Animations off (instead of 1x) selected in all 3 animations scale - Window/Transition/Animator
    • Also look at Circle CI's recommended test example.

Run tests

To run all checks, run the following command in your terminal:

$ ./gradlew check

To run Espresso tests on all connected devices:

$ ./gradlew connectedCheck

To install and run Espresso instrumentation tests for all flavors on connected devices:

$ ./gradlew connectedAndroidTest

To run unit tests for all variants:

$ ./gradlew test

Reporting

Before running any of these commands, run ./gradlew clean to clear any previous reports.

To Generate a JaCoCo coverage report (Use unifiedCoverageReport for Circle CI):

$ ./gradlew jacocoTestReport

Checking Build

./gradlew build --warning-mode=all --stacktrace

Checking Deprecations

./gradlew help --scan

Get SHA-1 sample (the default password is "android")

keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

Create Keystore

keytool -genkey -v -keystore keystores/keystore.jks -alias my-alias -keyalg RSA -keysize 2048

Export Environment Variables

export KEYSTORE="../keystores/keystore.jks"
export KEYSTORE_PASSWORD="my-pass"
export KEY_ALIAS="my-alias"
export KEY_PASSWORD="my-pass"

Base64 encode Google Services (Remove EOL characters when copying)

cat app/google-services.json | base64

Base64 encode Keystore

cat keystores/keystore.jks | base64

To generate APKs in Android Studio, pate the following into keystores/keystore.properties, then run ./gradlew assembleRelease:

storeFile=../keystores/keystore.jks
storePassword=my-pass
keyAlias=my-alias
keyPassword=my-pass
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载