Skip to content

Latest commit

 

History

History
123 lines (97 loc) · 3.12 KB

BUILD.md

File metadata and controls

123 lines (97 loc) · 3.12 KB

Build Instructions

This document describes how to set up your development environment and build the app on macOS or Linux.

Prerequisites

For macOS

  1. Android Studio

  2. Gradle

    brew install gradle
  3. Android Platform Tools

  4. Java 17

    brew install openjdk@17
    echo 'export JAVA_HOME="$(brew --prefix openjdk@17)"' >> ~/.zshrc
    echo 'export PATH="$JAVA_HOME:$PATH"' >> ~/.zshrc
    source ~/.zshrc  # Apply changes
    • Add to gradle.properties or ~/.gradle/gradle.properties:
      org.gradle.java.home=/opt/homebrew/opt/openjdk@17
  5. Maven

    brew install maven

For Linux/ChromeOS

  1. Android Studio

    • Download from https://developer.android.com/studio
    • ChromeOS:
      • download and install Studio:
      sudo dpkg -i ~/android-studio-2024.2.2.14-cros.deb # or whatever the download is
      /opt/android-studio/bin/studio.sh
      # install the Android SDK, accept the licenses
      echo 'export ANDROID_HOME=~/Android/Sdk' >> ~/.bashrc # or wherever it's installed
      
    • Linux:
      tar xzvf ~/Downloads/android-studio-2024.2.2.14-linux.tar.gz
      ~/Downloads/android-studio-2024.2.2.14-linux/android-studio/bin/studio.sh
      # install standard configuration and accept the licenses
      echo 'export ANDROID_HOME=~/Android/Sdk' >> ~/.bashrc # or wherever it's installed
      source ~/.bashrc  # Apply changes
      
      
  2. Gradle

    sudo apt install gradle
  3. Android Platform Tools

    sudo apt install adb # just need adb for this
  4. Java 17

    sudo apt install openjdk-17-jdk
    • Now either override calls to java/javac in your shell for everyone:
    echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> ~/.bashrc
    echo 'export PATH="$JAVA_HOME/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc  # Apply changes

    Or use (on Ubuntu) update-java-alternatives:

    sudo update-java-alternatives -s java-1.17.0-openjdk-amd64
    • Add to gradle.properties or ~/.gradle/gradle.properties:
    org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64
  5. Maven

    sudo apt install maven

Building the App

After installing all prerequisites, follow these steps to build the app:

  1. Download Clojure dependencies:

    ./scripts/download_clojure.sh
  2. Patch and build Clojure:

    ./scripts/patch-and-build-clojure.sh
  3. Build the debug APK:

    ./gradlew clean assembleDebug

The built APK will be available in the app/build/outputs/apk/debug/ directory.