I'm setting up Firebase Crashlytics. It works OK when I use google_services.json. But as we have several build variants, I prefer to use .xml instead, so I could make 2 applications at console, and 2 files in project:
-src/main/res/values/google_services.xml (for all builds, corresponds to test app at firebase)
-src/release/res/values/google_services.xml (for prod-release build)
Also I removed apply plugin: 'com.google.gms.google-services'
But my builds fails for all release tasks:
assembleTestRelease
assembleStageRelease
Reason is in
minifyEnabled true
shrinkResources true
Before migration on Firebase Crashlytic (with Fabric) it worked fine.
Error:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:uploadCrashlyticsMappingFileTestRelease'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:151)
...
Caused by: org.gradle.api.GradleException: Crashlytics could not find the resource file generated by Google Services. You may need to execute the :process<Variant>GoogleServices Task. Please check your Firebase project configuration (https://firebase.google.com/docs/android/setup).
at com.google.firebase.crashlytics.buildtools.gradle.ProjectVariantState.getGoogleAppId(ProjectVariantState.groovy:195)
... 35 more