Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 2.53 KB

File metadata and controls

85 lines (63 loc) · 2.53 KB

Release Build Instructions

Prerequisites

  1. Signing Configuration: Create gradle/signing.properties with:
    STORE_FILE=/path/to/your/keystore.jks
    STORE_PASSWORD=your_store_password
    KEY_ALIAS=your_key_alias
    KEY_PASSWORD=your_key_password

Build Commands

Debug APK

./gradlew.bat :motmbrowser:assembleDebug

Release APK

./gradlew.bat :motmbrowser:assembleRelease

Release AAB (for Google Play)

./gradlew.bat :motmbrowser:bundleRelease

Output Locations

Build Type Output Path
Debug APK motmbrowser/build/outputs/apk/debug/
Release APK motmbrowser/build/outputs/apk/release/
Release AAB motmbrowser/build/outputs/bundle/release/
Mapping File motmbrowser/build/outputs/mapping/release/mapping.txt

R8 Obfuscation

Release builds use R8 for code shrinking and obfuscation:

  • isMinifyEnabled = true - Enables R8 code shrinking and obfuscation
  • isShrinkResources = true - Removes unused resources
  • ProGuard rules: motmbrowser/src/main/proguard-motmbrowser.pro

Crash Report Deobfuscation

With AGP 8.13.2+, the mapping file is automatically embedded in the AAB under BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map.

When uploading to Google Play:

  • Google Play extracts the mapping file automatically
  • Crash reports in Play Console are deobfuscated automatically
  • No manual mapping file upload required

For local debugging of obfuscated crash logs, use the mapping file at: motmbrowser/build/outputs/mapping/release/mapping.txt

Verifying Release Build Configuration

After building a release AAB, run the release build verification tests:

./gradlew.bat :motmbrowser:bundleRelease
./gradlew.bat :motmbrowser:testDebugUnitTest --tests "com.bammellab.motm.release.ReleaseBuildTest"

These tests verify:

  • The mapping file exists in the AAB at the correct location
  • The mapping file contains valid R8 obfuscation data
  • The mapping file format is compatible with Google Play Console
  • The bundle contains minified DEX files

See TESTING.md for complete testing documentation.

Version Management

Version numbers are configured in motmbrowser/build.gradle.kts:

val versionMajor = 2
val versionMinor = 9
val versionPatch = 0
val versionBuild = 2901

Update these values before creating a new release.