Building Gramophone requires Android Studio, git, and a reasonably fast internet connection to download dependencies and submodules.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/foedusprogramme/gramophone/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Android Studio (latest beta version) — download from developer.android.com/studio
- git with submodule support
- A fast internet connection (Media3 is included as a git submodule and is large)
- An Android signing keystore (required to sign the APK)
Build steps
Initialize submodules
Gramophone includes Media3 and other dependencies as git submodules. You must initialize them before building — the build will fail without this step.This may take a few minutes depending on your connection speed.
Create package.properties
Gramophone uses a Save it as
package.properties file in the repository root to identify the build source. Create this file with the following content:package.properties
package.properties in the root folder of the repository (the same directory as settings.gradle.kts). The releaseType value is embedded into the APK’s BuildConfig and must not contain a double-quote character.If this file is missing and the
releaseType Gradle property is not set, the build will fail with a file-not-found error.Import your signing keystore in Android Studio
Open the project in Android Studio. When prompted, or through Build > Generate Signed Bundle / APK, import your signing keystore.You can also supply signing credentials via Gradle properties. The build file reads the following properties when present:Set these in your
app/build.gradle.kts
~/.gradle/gradle.properties file (not in the repository) to keep credentials out of source control.Build variants
The build file defines the following variants:| Variant | Minified | Shrunk | Notes |
|---|---|---|---|
release | Yes | Yes | Standard release build. |
debug | No | No | Includes LeakCanary and pseudo-locales. Application ID is org.akanework.gramophone.debug. |
userdebug | No | No | Profileable, JNI-debuggable, pseudo-locales enabled. Superset of release. |
nonMinifiedRelease | No | Yes | Release build without R8 minification. Useful for stack trace analysis. |
profiling | Yes | Yes | Profileable release build for performance profiling. |
benchmarkRelease | Yes | Yes | Used with the baselineprofile module for generating baseline profiles. |
Build configuration reference
Key values fromapp/build.gradle.kts:
app/build.gradle.kts
| Property | Value |
|---|---|
| Application ID | org.akanework.gramophone |
| Version name | 1.0.17 |
| Version code | 20 |
compileSdk | 37 |
minSdk | 21 (Android 5.0) |
targetSdk | 35 |
Reproducible builds
Gramophone is configured to produce reproducible builds where possible:- PNG crunching is disabled (
isCrunchPngs = false) so asset bytes are not altered by the build toolchain. - Generated timestamps are excluded from the
aboutlibrariesmetadata file. - VCS info is not embedded in any build type (
vcsInfo { include = false }). - Dependency metadata is excluded from the APK and bundle (
dependenciesInfo.includeInApk = false).