Welcome to the Android team! In this doc, you can find all the basics for getting your machine up and running for our project.
Android Studio
Download and install JetBrains Toolbox.
Reach out in #team-android in Slack to see what version of Android Studio people are using. It may not be the “Stable” version - at times we use a beta version for a particular reason, such as compatibility with the version of Android Gradle Plugin we’re currently using.
Open JetBrains Toolbox and use it to install the needed version of Android Studio.
Open Android Studio and go through the initial setup, such as installing the Android SDK, latest commandline tools, emulator image, etc.
Credentials
Artifactory API key
An API key is necessary for Gradle to retrieve artifacts that the project depends upon. You will need to set up your user first, and then create an API key.
Follow the Logging Into the Web Interface steps here. Your user will not have permissions by default, so you must be given permissions that match other Android team member’s by an admin. Make sure this is complete before proceeding.
Follow the API Key setup instructions here to sign in to Artifactory with your @jackhenry.com Google account and get your API key. Keep this page open for the moment, so you can come back and copy your API key.
GitHub tokens
Follow these instructions to create a GitHub personal access token named GITHUB_OAUTH_REPO_TOKEN with the following scopes checked. Keep the page open until you’ve copied the token, which you’ll do in the next step.
reporead:orgadmin:public_keyuserwrite:discussion
Note: If you’re having issues with your tokens, make sure you go to your tokens and click “Configure SSO” on each of them and follow the steps to authorize the token for the Banno org.
Environment
Update your environment variables by adding the following to your .zprofile in your home directory (or other relevant config file for your terminal), replacing <your_...> with your JHA email address, key, and token.
export JAVA_HOME="$HOME/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/emulator:$PATH
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH
export LC_ALL=en_US.UTF-8
export ARTIFACTORY_USER=<your_banno_email_address>
export ARTIFACTORY_PASSWORD=<your_artifactory_api_key>
export GITHUB_OAUTH_REPO_TOKEN=<your_repo_token>
export GITHUB_ACCESS_TOKEN=$GITHUB_OAUTH_REPO_TOKEN
export GITHUB_API_TOKEN=$GITHUB_OAUTH_REPO_TOKEN
Test Artifactory
The setup for Artifactory can be fickle. Test to make sure your environment is set up correctly before proceeding.
Run this command:
curl -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWORD https://artifactory.banno-tools.com/artifactory/libs-release-local/com/banno/client/client-multiplatform/1.0.0/client-multiplatform-1.0.0.pom
This will attempt to pull a private resource using the credentials you have created.
If you see a 401 response, like…
"errors" : [ {
"status" : 401,
"message" : "Authentication is required"
} ]
}
… then something went wrong. Reach out to the team for help.
If you see something like…
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.banno.client</groupId>
<artifactId>client-multiplatform</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>1.8.22</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
… then you are good to go! Carry on your merry way with the knowledge that Artifactory has not bested you today.
GCloud
GCloud CLI is needed to provision release builds. Follow this guide to install it.
Then, run this command, which should launch a browser window to complete authentication for GCloud CLI.
gcloud auth application-default login
Homebrew
Follow the instructions here to install Homebrew, then run the following command to install scrcpy.
brew install scrcpy
Emulator
Check out the Android Emulator guide
Configure ADB on Chromebooks
Follow these instructions to setup ADB over WiFi and Proxyman on Chromebooks
Decision Records
The Android team’s decision records are important to be familiar with. They hold expectations and gold standards for the way we work. Decision records are located in the mobile-android repository in the folder labeled “docs” which you can see here on GitHub. A particularly relevant decision record for new team members to be familiar with is this one about pull requests. There are also many records about architecture decisions that it wouldn’t hurt to check out. These are living documents, so if they leave you with any questions or ideas for improvement, please send a message in the team-android slack channel.