Skip to main content

Prerequisites

Before you begin, make sure the following tools are installed on your system.

JDK 21

Required to compile Kotlin and run Gradle. Use any JDK 21 distribution such as Temurin.

Android platform tools

Needed to generate a debug keystore if you do not already have one.

protobuf-compiler v3.21+

Required to generate protobuf sources before building the app.
The setup has been tested on Linux. It should work on macOS and Windows with minor adjustments to shell commands.

Clone and build

1

Clone the repository

Clone the repo and initialise all Git submodules. Metrolist relies on several submodules for its internal libraries.
2

Generate protobuf sources

Metrolist uses Protocol Buffers for message serialisation. Run the generation script inside the app directory before building.
3

Generate a debug keystore

A persistent debug keystore is required to sign debug builds consistently. If one does not already exist, generate it now.
Using a persistent keystore (rather than the default Android debug keystore) means your APK signature stays consistent across machines and rebuilds, which matters for testing upgrades.
4

Build the debug APK

Assemble the FOSS debug variant using Gradle.
The output APK will be written to:

Optional: LastFM API keys

Metrolist supports LastFM scrobbling. The API keys are optional — the app builds and runs without them, but scrobbling will not be functional. You can provide credentials in one of two ways:
Add the following lines to local.properties in the project root (create the file if it does not exist):
local.properties
Get your credentials from the LastFM API account page.
In CI/CD environments, these are stored as GitHub Actions secrets (LASTFM_API_KEY and LASTFM_SECRET) and injected automatically during the build. Never commit API keys to the repository.

Branch and commit conventions

All contributors — human and automated — should follow these conventions to keep the repository history clean and navigable.

Branch naming

Branch names should be concise but descriptive enough to convey the purpose at a glance. For example: feat/sleep-timer-widget or fix/playlist-reorder-crash.

Commit messages

Follow the conventional commits format:
The scope is optional. Examples:

String resources

All new or edited user-facing strings must be added to app/src/main/res/values/metrolist_strings.xml. Do not edit strings.xml or any other metrolist_strings.xml file in locale subdirectories — those are managed by the translation system.
Locale-specific files such as app/src/main/res/values-fr/metrolist_strings.xml are generated and updated via Weblate. See Translations for details.