Pass parameters to gradle task

Hi! I’m trying to figure out how to create task for recreating lint baseline file in gradle.
Basically to recreate lint baseline file you just need to delete it and execute lint task.
I tried this approach:

tasks.register<Delete>("rebuildLintBaseline") {

The only problem I found is now I need to disable Crashlytics for release build type because we store our Crashlytics identifier on CI server and because of this I cannot build release build variant locally.

When I rebuild lint baseline by hand I disable it, rebuild baseline and enable it again after. You disable Crashlytics by setting enableCrashlytics extra to false on BuildType:

named("release") {
        (this as ExtensionAware).extra["enableCrashlytics"] = false

Can I somehow pass parameter to finalizer task based on which I will disable Crashlytics?