Skip to content

Lazy variant details aren't supported for ProGuard mappings upload #776

Open
@bddckr

Description

@bddckr

Gradle Version

8.10.2

AGP Version

8.7.0

Code Minifier/Optimizer

R8

Version

4.11.0

Sentry SDK Version

7.15.0

Steps to Reproduce

  1. Configure your app's version code and name via the property-based APIs AGP offers for that these days.
    1. A recipe doing so in one way (manifest transformation) can be seen here.
    2. Setting the variant outputs' properties can also be used. See a usage example from Slack here.
  2. Use this plugin to upload ProGuard mapping files for your release build.
  3. Check out the uploaded mappings at https://example.sentry.io/settings/projects/myproject/proguard/.
  4. Notice that all of them are linked to the non-existing release com.example.myproject@undefined.
    1. This means it's quite difficult to find the mappings used in a release.
      1. Why do I care? Because I log (to Sentry) a bunch of things that aren't exceptions, Sentry's automatic deobfuscation doesn't apply. To deobfuscate logged details manually, I need the correct mappings file of the release that raised an issue. While it's rare for me to apply this manual process, it's still crucial to allow understanding all Sentry errors. Downloading the mappings file from Sentry allows there to be a single source of truth when it comes to all things related to a release.
    2. Note: This is not breaking Sentry's automatic deobfuscation of stack traces. That still works fine thanks to the UUID-based lookup.
    3. As seen here, that seems to be expected at this time since the plugin doesn't support all the various ways the version details can be set in newer AGP versions.

Expected Result

The lazily configured version details should be used when uploading ProGuard mappings.

Actual Result

The statically set version values are used when uploading ProGuard mappings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidBugSomething isn't working

    Type

    Projects

    Status

    Backlog

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions