Setting up your Development Environment
This page contains the guidelines for setting up your development environment for Stoat for Android. These guidelines are important to ensure that your development environment is set up correctly and you can start contributing to the project.
If you want to compile the app yourself, you can follow these guidelines. You may not need Android Studio, as it’s possible to build the app from the command line. GitHub Codespaces automates most of the process for you if you want to go that route and this guide covers those steps, but won’t go into detail on other command-line methods.
-
Download the Git version control system.
Terminal window winget install --id Git.Git -e --source wingetUsing Homebrew:
Terminal window brew install gitUsing your package manager. For example, on Ubuntu:
Terminal window sudo apt install git -
Download Android Studio.
Terminal window winget install --id Google.AndroidStudio -e --source wingetFrom the official website.
Look for Android Studio in your package manager.
Alternatively, from Flathub or the official website.
-
Download Deno.
Please see the Deno Runtime Manual for installation guidance.
-
Clone the repository.
Terminal window git clone --recursive https://github.com/stoatchat/for-android.gitSpecify
--recursiveto ensure that submodules are cloned as well. -
Open the project in Android Studio.
-
Install the required dependencies.
- Android SDK, latest version
- Android NDK, latest version
You can install these from the SDK Manager in Android Studio.
-
Download required additional, embedded dependencies using the provided script.
Terminal window deno run -A scripts/download_deps.ts -
Copy the
stoatbuild.properties.examplefile tostoatbuild.propertiesand fill in the required values.Terminal window cp stoatbuild.properties.example stoatbuild.propertiesThe
stoatbuild.propertiesfile contains the following properties:Property Description sentry.dsnSentry DSN for error reporting sentry.upload_mappingsWhether to upload obf. maps to Sentry build.debug.app_nameThe name of the app in debug builds, arbitrary build.flavour_idLeave as ZZUU -
Copy the
sentry.properties.examplefile tosentry.propertiesand fill in the required values.Terminal window cp sentry.properties.example sentry.propertiesThe
sentry.propertiesfile contains the following properties:Property Description defaults.urlThe URL of the Sentry instance defaults.projectThe project ID in Sentry defaults.orgThe organization ID in Sentry auth.tokenThe authentication token for Sentry, used to upload maps You can get these values from the Sentry dashboard.
-
Copy the
google-services.json.examplefile within theappdirectory togoogle-services.json.Firebase services are integrated into the project, so we need a
google-services.jsonfile for the build to succeed. For development purposes, use the provided example file:Terminal window cp app/google-services.json.example app/google-services.json -
Build the project.
You can build the project by clicking on the ‘Run’ button in Android Studio.
If asked, build the:appmodule.If building within Github Codespaces, you can build a fresh debug apk by running
./gradlew assembledebug --no-daemonfrom the root of the project. Upon completion, the apk will be withinapp/build/outputs/apk/debug/ -
You’re all set! You can now start contributing to Stoat for Android.