bugsnag / bugsnag-android-gradle-plugin

Gradle plugin for BugSnag which uploads ProGuard, DexGuard and NDK mapping files, and sends build notifications
https://docs.bugsnag.com/build-integrations/gradle/
MIT License
70 stars 38 forks source link

DexGuard 9.4+ Gradle plugin no longer has a version property #530

Closed mrjameshamilton closed 1 year ago

mrjameshamilton commented 1 year ago

Describe the bug

The version field has been removed from DexGuard Gradle Plugin which means that the version check here throws a MissingPropertyException and then Bugsnag thinks that DexGuard is not being used.

The manifest fallback is still there when using the path, so the plugin could check if the property exists first.

        if (dexguard.hasProperty("version") && dexguard.version != null) {
            return dexguard.version
        } else {

But this doesn't work if the path option is not used i.e. DexGuard is retrieved from a Maven repository.

Additionally, detecting earlier versions of DexGuard relied on the exception, so this might causes issues for older versions.

Steps to reproduce

  1. Apply DexGuard plugin and Bugsnag plugin
  2. Bugsnag plugin won't upload the correct mapping file because it thinks DexGuard is not being used
johnkiely1 commented 1 year ago

Hi @mrjameshamilton, thanks for reporting. This is something we are aware of and is on our backlog to fix.
in the meantime you can still manually upload your dexguard mappings using our CLI https://docs.bugsnag.com/build-integrations/bugsnag-cli/upload-android-proguard

mrjameshamilton commented 1 year ago

Hi @johnkiely1 ! We've added the version field back into the DexGuard Gradle plugin which should resolve the compatibility and no changes should be required in bugsnag. It will be in DexGuard 9.4.15.

clr182 commented 1 year ago

Hi @mrjameshamilton, That's great, thanks for informing us! Are you happy for us to close out this ticket, or do you have any further questions?

mrjameshamilton commented 1 year ago

Thanks, the issue can be closed!