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

AGP 7.2.0 not supported #462

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug

Build failure with AGP 7.2.0

Steps to reproduce

Upgrade to AGP 7.2.0 and run a release task

Environment

java.lang.NoSuchMethodError: 'java.io.File com.android.build.gradle.tasks.ExternalNativeBuildTask.getObjFolder()'
    at com.bugsnag.android.gradle.BugsnagPlugin$registerReleasesUploadTask$1$$special$$inlined$forEach$lambda$1.transform(BugsnagPlugin.kt:699)
    at com.bugsnag.android.gradle.BugsnagPlugin$registerReleasesUploadTask$1$$special$$inlined$forEach$lambda$1.transform(BugsnagPlugin.kt:67)

Cause is a changed API in ExternalNativeBuildTask where previously objFolder & soFolder returned a File it now returns a DirectoryProperty

Diff: https://android.googlesource.com/platform/tools/base/+/ff92a1c5fe15aa34c294044f358fcc9b39e19f8b%5E%21/#F13

luke-belton commented 2 years ago

Hi @akoell - thanks for raising this. We're going to investigate a fix and will keep you updated on this thread.

yousif-bugsnag commented 2 years ago

This is now fixed in v7.2.1