androidfirebaseandroid-gradle-plugincrashlytics

Circular dependency between the following tasks after updating Gradle Plugin and Firebase Crashlytics Plugin


I have updated the following deps

androidGradlePlugin = "8.2.2"
firebaseBom = "32.8.1"
firebaseCrashlyticsPlugin = "2.9.9"

to

androidGradlePlugin = "8.4.0"
firebaseBom = "33.0.0"
firebaseCrashlyticsPlugin = "3.0.0"

And now the project can't be build:

Circular dependency between the following tasks:
:app:dataBindingGenBaseClassesDebug
\--- :app:mergeDebugResources
     +--- :app:generateDebugLocaleConfig
     |    \--- :app:extractDebugSupportedLocales
     |         \--- :app:injectCrashlyticsMappingFileIdDebug
     |              +--- :app:dataBindingGenBaseClassesDebug (*)
     |              \--- :app:kspDebugKotlin
     |                   +--- :app:dataBindingGenBaseClassesDebug (*)
     |                   \--- :app:processDebugResources
     |                        +--- :app:mapDebugSourceSetPaths
     |                        |    \--- :app:injectCrashlyticsMappingFileIdDebug (*)
     |                        +--- :app:mergeDebugResources (*)
     |                        +--- :app:processDebugManifest
     |                        |    \--- :app:processDebugMainManifest
     |                        |         \--- :app:extractDeepLinksDebug
     |                        |              \--- :app:injectCrashlyticsMappingFileIdDebug (*)
     |                        \--- :app:processDebugManifestForPackage
     |                             \--- :app:processDebugManifest (*)
     \--- :app:injectCrashlyticsMappingFileIdDebug (*)

I noticed injectCrashlyticsMappingFileIdDebug appears too much but why?

it works with firebaseCrashlyticsPlugin = "2.9.9" and with the newest versions for:

androidGradlePlugin = "8.4.0"
firebaseBom = "33.0.0"

but had to add to the manifest:

<property
    android:name="android.adservices.AD_SERVICES_CONFIG"
    android:resource="@xml/gma_ad_services_config"
    tools:replace="android:resource" />

to fix the following issue when using the latest Gradle plugin version


Solution

  • Update: (20-05-2024)

    It looks like this issue has been rectified in the 3.0.1 release of com.google.firebase.crashlytics (release notes dated May 13th, 2024).

    I've given it a quick test and can confirm that bumping the dependency up from 2.9.9 to 3.0.1 worked a treat in my case.


    Stopgap Solution: (13-05-2024)

    ⚠️ The below feedback has since been superseded. See the update, above. ⚠️

    I came across similar woes after updating com.google.firebase.crashlytics from 2.9.9 -> 3.0.0 and after a bit of investigation, I came across this thread and comment.

    The above linked comment references a stopgap solution as a workaround for the firebaseCrashlyticsPlugin circular dependency issue. Judging by feedback in the original discussion thread, it seems to do the trick. I haven't personally jumped through the hoops associated with this workaround as yet, but have instead opted to run with 2.9.9 for the moment (I'm a tad time-poor at the moment). That said, if I find a pocket of time to give it whirl myself, I'll follow this up with the outcomes.

    In terms of what's happening under the hood, I believe the above links also do a decent job of explaining where things are falling over.

    In any case, I sincerely hope that this is of some help to you.