Configuration

local.properties keys, BuildConfig fields, and graceful degradation for Android services.

This is the Android equivalent of an environment variables page. The template does not use .env, Docker, or a server runtime for app configuration. It reads git-ignored local.properties values during the Gradle build and exposes them as BuildConfig fields inside the APK.

The Android config chain

local.properties (git-ignored)

Android Studio writes sdk.dir here. You add local service keys in the same file. Do not commit it.

Gradle reads each key

app/build.gradle.kts loads the file with java.util.Properties. Missing strings become ""; booleans such as POSTHOG_DISABLED and POSTHOG_DEBUG only become true when the value is exactly true ignoring case.

BuildConfig fields are generated

The app reads values such as BuildConfig.SUPABASE_URL, BuildConfig.REVENUECAT_ANDROID_KEY, and BuildConfig.GOOGLE_WEB_CLIENT_ID. LINKING_DOMAIN is also passed into the manifest as the App Links host.

Controllers gate their own service work

RevenueCat, Google Sign-In, PostHog, Sentry, update prompts, legal links, and other optional integrations check their keys and no-op or hide affordances when they are absent.

Values in local.properties are client-side build values. They ship in the APK when you build with them. Server-side secrets such as REVENUECAT_WEBHOOK_AUTH and Firebase Admin credentials belong in Supabase Edge Function secrets, never in local.properties.

Starter local.properties

# Android SDK path; Android Studio usually writes this for you.
sdk.dir=/path/to/Android/sdk

# Supabase
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_PUBLISHABLE_KEY=your_publishable_key

# Google Sign-In; OAuth web client ID.
GOOGLE_WEB_CLIENT_ID=your_google_oauth_web_client_id

# RevenueCat
REVENUECAT_ANDROID_KEY=your_public_revenuecat_android_key

The template README's example block currently omits GOOGLE_WEB_CLIENT_ID, but the code is fully wired: GoogleSignInController reads it and the login/signup screens hide "Continue with Google" while it is empty.

Key reference

Supabase

Prop

Type

Supabase-backed surfaces include auth, todos, profiles, uploads, device tokens, test push, and the subscriptions entitlement read model.

RevenueCat

Prop

Type

The Pro entitlement id is not a local.properties key. It is the code constant PurchasesController.PRO_ENTITLEMENT_ID = "pro". Configure Google Play products pro_monthly, pro_yearly, and pro_lifetime in RevenueCat and attach them to the same pro entitlement.

Google Sign-In

Prop

Type

This is the OAuth web client ID because Android Credential Manager returns a Google ID token that Supabase verifies server-side.

Observability

Prop

Type

Update gate

Prop

Type

Play In-App Updates are Play-only. Local debug builds can exercise the version comparison and fallback URL, but the real update flow requires a Play-delivered build.

Prop

Type

Release signing

Prop

Type

When RELEASE_STORE_FILE is blank or the file is missing, the release build stays unsigned instead of failing debug and CI workflows. See Play Store Release.

Firebase config file

FCM uses a second config file:

app/google-services.json

app/build.gradle.kts applies com.google.gms.google-services only when that file exists, so the project builds without Firebase configuration. Download the file from Firebase Console for your Android app and keep it out of git. The README mentions app/google-services.json.example as a shape reference; the current template tree does not include that example file, so use Firebase's downloaded JSON as the source of truth.

Server-side secrets

Keep privileged values in Supabase Edge secrets:

Prop

Type

Those values never belong in the APK. They are set with supabase secrets set and used by the Edge Functions described in Supabase Setup.

On this page