Skip to content
Aqib Javid Bhat edited this page Aug 27, 2024 · 2 revisions

Welcome to the Chatty wiki!

Building the Chatty Project via GitHub Codespaces | Rough Doc | @aqib‐m31

Setting Up Android Development Environment in GitHub Codespaces

1. Update and Upgrade the System

First, update and upgrade your system packages:

sudo apt-get update && sudo apt-get upgrade

2. Install Gradle

Install Gradle, which is essential for building your Android project:

sudo apt-get install gradle

3. Set Up Android SDK

Create a directory for the Android SDK:

cd ~
mkdir android-sdk
cd android-sdk

Download the Command Line Tools for Linux:

Get latest via https://developer.android.com/studio

wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip

Unzip the downloaded file:

unzip commandlinetools-linux-11076708_latest.zip
rm commandlinetools-linux-11076708_latest.zip

Move everything inside cmdline-tools to cmdline-tools/latest:

mkdir -p cmdline-tools/latest
mv cmdline-tools/* cmdline-tools/latest/

Update your PATH environment variable to include the Android SDK tools:

export PATH="$PATH:/home/codespace/android-sdk/cmdline-tools/latest/bin"

Add this line to ~/.bashrc to make the change persistent:

echo 'export PATH="$PATH:/home/codespace/android-sdk/cmdline-tools/latest/bin"' >> ~/.bashrc
source ~/.bashrc

4. Install Android SDK Components

Install the necessary Android SDK components:

yes | sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
yes | sdkmanager --licenses

5. Configure the Project

Navigate to your project directory:

cd /workspaces/Chatty

Create a local.properties file to point to the Android SDK:

echo "sdk.dir=/home/codespace/android-sdk" > local.properties

Create a keystore.properties file for the release signing configuration:

cat <<EOL > keystore.properties
STORE_FILE=/workspaces/Chatty/chatty.keystore
STORE_PASSWORD=
KEY_ALIAS=
KEY_PASSWORD=
EOL

Create an env.properties file for environment-specific configurations:

cat <<EOL > env.properties
SERVER_URL_DEBUG=http://127.0.0.1
SERVER_URL_RELEASE=https://chatty-placeholder.com
EOL

Note: Ensure you place the chatty.keystore file in the project root directory.

6. Build the APK

To generate a debug APK, run:

./gradlew assembleDebug

To generate a release APK, run:

./gradlew assembleRelease

Just a Rough Document for a Quick Overview in Case I Forget