Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.35 KB

CONTRIBUTING.md

File metadata and controls

62 lines (46 loc) · 2.35 KB

Contributing

The project is still in its early stages. We are not actively seeking external contributions at this time. Small contributions are welcome.

iOS

Build xcframework

  1. ./gradlew xcframework

Note that Java 11+ is required. One simple option to get it is Amazon's Corretto distribution.

Android & Kotlin multiplatform

Set up Android Studio

  1. Install Android Studio version Arctic Fox (2020.3.1)
  2. Install the Kotlin Multiplatform Mobile plugin

Launch sample apps

Add or edit the local.properties file to include the following properties:

trafi.apiBaseUrl=https\://YOUR-BASE-URL-HERE.trafi.com/
trafi.apiKey=YOUR-API-KEY-HERE

Update Android screenshot tests

Shot is used to test and record new screenshots. To update screenshots, run the “Record Android screenshot tests” workflow, specifying the branch on which new / updated screenshots should be generated and committed on.

You may want to record new screenshots or run the tests locally.

  1. Create the emulator. avdmanager -v create avd --force -n "Nexus_6_API_28" --device "Nexus 6" -k "system-images;android-28;default;x86"
  2. Start the emulator. ~/Library/Android/sdk/emulator/emulator @Nexus_6_API_28 -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim The used device currently should be set as Nexus 6 and architecture should be x86, otherwise generated screenshots will have minuscule differences compared to the ones generated by the GitHub workflow.
  3. Record new / updated screenshots. ./gradlew executeScreenshotTests -Precord
  4. Run screenshot tests to verify. ./gradlew executeScreenshotTests
  5. Commit & push the new / updated screenshots.

Other tools

Run embedmd

embedmd runs automatically on every pull request and helps keep code snippets in documentation files up-to-date. You may want to run the tool locally.

  1. Install Go
  2. go get github.com/campoy/embedmd
  3. embedmd -w **/*.md