title: Crashlytics initialization crash after upgrading Gradle version to 7.0.3
body: <p>We recently upgraded our gradle build version to 7.0.3</p>
  <pre><code>classpath 'com.android.tools.build:gradle:7.0.3'
  </code></pre>
  <p>App is crashing in release variant. When I tried removing minification, it does not crash. Here is the crash log for the same.</p>
  <pre><code>E/FirebaseCrashlytics: Crashlytics was not started due to an exception during initialization
  java.lang.ClassCastException: com.b6.e cannot be cast to android.content.Context
      at com.zm.f4.get(Unknown Source:1)
      at com.c6.a.get(DoubleCheck.java:5)
      at com.a6.p.get(TransportRuntime_Factory.java:3)
      at com.a6.p.get(TransportRuntime_Factory.java:1)
      at com.c6.a.get(DoubleCheck.java:5)
      at com.a6.n.a(TransportRuntime.java:3)
      at com.rb.q0.c(SessionReportingCoordinator.java:8)
      at com.mb.b.a(Unknown Source:133)
      at com.mb.j.get(Unknown Source:3)
      at com.mb.p.get(Lazy.java:5)
      at com.mb.l.f(ComponentRuntime.java:5)
      at com.mb.l.g(ComponentRuntime.java:5)
      at com.gb.c.d(FirebaseApp.java:19)
      at com.gb.c.e(FirebaseApp.java:24)
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:9)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:3)
      at android.app.ActivityThread.installProvider(ActivityThread.java:7769)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:7299)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7207)
      at android.app.ActivityThread.access$1700(ActivityThread.java:287)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:255)
      at android.app.ActivityThread.main(ActivityThread.java:8212)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
  </code></pre>
  <p>Extra information: I had to upgrade my JDK to 11 for successful build in my Jenkins CI/CD after upgrading gradle build version.</p>
  <p>Also we have this mentioned in module gradle build file.</p>
  <pre><code>compileOptions {
      targetCompatibility JavaVersion.VERSION_1_8
      sourceCompatibility JavaVersion.VERSION_1_8
  }
  
  kotlinOptions {
      jvmTarget = JavaVersion.VERSION_1_8
  }
  </code></pre>