Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 1.08 KB

CONTRIBUTING.md

File metadata and controls

26 lines (24 loc) · 1.08 KB

Development

Requires the android sdk installed and the ANDROID_HOME environment variable set:

export ANDROID_HOME=/Users/{user}/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

Testing

Intellij

Android instrumented tests can be run by running them through IntelliJ with the Android plugin or Android Studio. The MOMENTO_API_KEY must be set in your .zshrc or somewhere else IntelliJ can read it when it executes the gradle project. The tests cannot directly read environment variables from the host machine, so MOMENTO_API_KEY is read by the gradle project and stored in a test property.

Command Line

Android instrumented tests can be run from the command line by first starting an emulator:

emulator -list-avds # list available emulators
emulator -avd {one of the listed emulators} # start the emulator

Then run the tests:

./gradlew connectedAndroidTest

MOMENTO_API_KEY must be set for the tests to work.