Blog

About

Building Dhaaga from Source

2025-01-04

This project uses Expo EAS to build and package the app.

So, the guide would be split into 2 segments.

You can skip this section if not building a fork

The application ids for Dhaaga are:

  • io.suvam.dhaaga --> Dhaaga (Play Store)
  • io.suvam.dhaaga.lite --> Dhaaga (Lite) (Izzy On Droid)
  • io.suvam.dhaaga.alt --> Dhaaga (Alt) (Default APKs)

In order not to overwrite the apps using the above ids, these changes are needed:

In app.config.ts, change

  • name
  • slug (affects EAS builds)
  • ios.bundleIdentifier
  • android.package

#Only needed for EAS builds

#Preparation

  1. There are files called eas.example.json and .env.example. Copy these files as eas.json and .env.
  2. Run yarn prebuild from the apps/mobile folder. This ensures that the @dhaaga/* packages are built and available.

#Compile using EAS

At this point, you are all set to produce builds using EAS servers. Remember to stay within your free tiers!

  • yarn client --> Generates the Dev Client, that can be used for development
  • yarn apk --> Generates an installation prod apk
  • yarn aab --> Generates an android bundle to be sent to play store

#Compile Locally (-Lite)

To produce a build without Lite edition considerations, simply run the following:

  • rm -rf ./android && rm -rf ./ios
  • npx expo prebuild
  • yarn lite

Note that the signing key used for this build was the debug one. If you are an android developer, you will know how to generate a signing key following this guide from Google.

#Compile Locally (Lite)

Compiling the Lite edition requires extra steps, mainly for:

  • Stripping signing key metadata
  • Minimising app size
  • Stripping undesired permissions

These are considered good-to-haves for distribution in IzzyOnDroid and F-Droid.