How to apply the Gradle Shadow plugin for conflicting dependencies in Android

I want to apply John Engelman’s conflicting dependency shading plugin:
VuePress

to shadow 'com.google.api.grpc:proto-google-common-protos:2.9.2' from

implementation platform('com.google.cloud:libraries-bom:26.1.1')
implementation 'com.google.cloud:google-cloud-kms'

that conflict with com.google.firebase:protolite-well-known-types:18.0.0 from

implementation platform('com.google.firebase:firebase-bom:30.4.1')
implementation 'com.google.firebase:firebase-firestore'

In build.gradle(:app) I have:

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation

plugins {
    id 'com.android.application'
    id 'com.github.johnrengelman.shadow' version '7.1.2'
    id 'maven-publish'
}

android {
    compileSdk 32
	...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    ...
    implementation platform('com.google.firebase:firebase-bom:30.4.1')
    implementation 'com.google.firebase:firebase-firestore'

    implementation platform('com.google.cloud:libraries-bom:26.1.1')
    implementation 'com.google.cloud:google-cloud-kms'
    shadow 'com.google.api.grpc:proto-google-common-protos:2.9.2'
    ...
}

task shadowJar(type: ShadowJar) {
    dependencies {
        exclude(dependency('com.google.api.grpc:proto-google-common-protos'))
    }
    mergeServiceFiles()
}

task relocateShadowJar(type: ConfigureShadowRelocation) {
    target = tasks.shadowJar
    prefix = 'myApp'
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar

publishing {
    publications {
        mavenPublish(MavenPublication) { publication ->
            project.shadow.component(publication)
        }
    }
}

But there is no effect. Does anyone know how to solve this task? I will be grateful.

The complete code for this test is: