Skip to content

Conversation

@graycreate
Copy link
Member

Summary

Enable automatic upload of ProGuard/R8 mapping files to Google Play Console for crash deobfuscation.

Changes Made

Release Workflow (.github/workflows/release.yml)

  • Bundle Artifact: Include mapping.txt in release-bundle artifact alongside AAB file
  • File Detection: Add mapping file discovery in Find bundle and symbols step
  • Upload Configuration: Add mappingFile parameter to both Google Play upload steps

Workflow Logic

# Package mapping file with AAB
path: |
  app/build/outputs/bundle/**/*.aab
  app/build/outputs/mapping/release/mapping.txt

# Detect mapping file
MAPPING_PATH=$(find release-artifacts -name "mapping.txt" 2>/dev/null | head -1)

# Upload to Google Play Console
mappingFile: ${{ steps.find-files.outputs.mapping_path }}

Benefits

🎯 Crash Deobfuscation: Stack traces in Google Play Console will show original class/method names
📊 Better Debugging: Production crashes can be properly diagnosed with unobfuscated stack traces
🔄 Automatic Process: No manual mapping file upload required
Backwards Compatible: Works whether mapping file is present or not

Impact

  • Next Release: Will automatically upload ReTrace mapping file to Google Play Console
  • Crash Reports: Production crash stack traces will be properly deobfuscated
  • Security: App remains obfuscated while maintaining debuggability

Dependencies

This PR builds on the minification changes in PR #91:

  • Requires R8 minification to be enabled (minifyEnabled true)
  • Depends on mapping.txt file generation during build process

🤖 Generated with Claude Code

- Include mapping.txt in release-bundle artifact during build
- Add mapping file detection in upload workflow
- Configure mappingFile parameter for both Google Play upload steps

This enables:
- Automatic ReTrace mapping file upload to Google Play Console
- Proper crash stack trace deobfuscation for minified releases
- Better crash diagnostics for production issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2025 10:55
@graycreate graycreate merged commit ee09c27 into main Sep 9, 2025
4 checks passed
@graycreate graycreate deleted the feature/upload-mapping-files branch September 9, 2025 10:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables automatic upload of ProGuard/R8 mapping files to Google Play Console to enable crash deobfuscation, allowing production crash stack traces to display original class and method names instead of obfuscated ones.

  • Modifies the release workflow to include mapping.txt files in the release bundle artifact
  • Adds discovery logic to detect ProGuard/R8 mapping files in the downloaded artifacts
  • Configures both Google Play upload steps to include the mapping file parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

path: app/build/outputs/bundle/**/*.aab
path: |
app/build/outputs/bundle/**/*.aab
app/build/outputs/mapping/release/mapping.txt
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mapping file path is hardcoded to the release build variant. Consider using a wildcard pattern like app/build/outputs/mapping/**/mapping.txt to support different build variants and configurations.

Suggested change
app/build/outputs/mapping/release/mapping.txt
app/build/outputs/mapping/**/mapping.txt

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants