Contributing

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

iOS

Build xcframework

  1. ./gradlew xcframework

Android & Kotlin multiplatform

Set up Android Studio

  1. Install Android Studio version Arctic Fox (2020.3.1) Canary 6

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

  2. Record new / updated screenshots. ./gradlew executeScreenshotTests -Precord

  3. Run screenshot tests to verify. ./gradlew executeScreenshotTests

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