-
Notifications
You must be signed in to change notification settings - Fork 641
Description
[READ] Step 1: Are you in the right place?
[REQUIRED] Step 2: Describe your environment
- Android Studio version: Arctic Fox AGP 7.0.3
- Firebase Component: Crashlytics Gradle Plugin
- Component version: 2.6.0+
- Gradle: 7.3
[REQUIRED] Step 3: Describe the problem
Similiar to issues #2444 and #2665 the recommended fix is still not working when using the recommended "workaround" on Kotlin Gradle DSL config files.
Steps to reproduce:
What happened?
It seems that on Crashlytics gralde plugin 2.6.0+. The plugin extension does not seem to get registered into the project even after including the plugin in the plugins
block.
How can we make the problem occur?
Simply by increasing the crashlytics gradle plugin version to any version above 2.6.1 will exhibit the same issue.
This could be a description, log/console output, etc.
I determine that this is the case by printing out all the plugin extensions name and type in my project by doing
Here is the printout on version 2.6.0+, this is 2.8.0 specifically
extension = ext + ExtraPropertiesExtension
extension = libs + LibrariesForLibs
extension = versionCatalogs + VersionCatalogsExtension
extension = base + BasePluginExtension
extension = defaultArtifacts + DefaultArtifactPublicationSet
extension = sourceSets + SourceSetContainer
extension = reporting + ReportingExtension
extension = java + JavaPluginExtension
extension = javaToolchains + JavaToolchainService
extension = buildOutputs + NamedDomainObjectContainer<BaseVariantOutput>
extension = android + BaseAppModuleExtension
extension = androidComponents + ApplicationAndroidComponentsExtension
extension = androidComponents_compat_by_type + ApplicationAndroidComponentsExtension
extension = kotlin + KotlinAndroidProjectExtension
extension = kotlinTestRegistry + KotlinTestsRegistry
extension = kapt + KaptExtension
extension = dependencyCheck + DependencyCheckExtension
extension = hilt + HiltExtension
extension = detekt + DetektExtension
extension = jacoco + JacocoPluginExtension
extension = byeByeJetifier + ByeByeJetifierExtension
extension = ktlint + KtlintExtension
extension = dexguard + DexGuardExtension
extension = easylauncher + EasyLauncherExtension
extension = googleServices + GoogleServicesPlugin.GoogleServicesPluginConfig
this is the printout on version 2.5.2
extension = ext + ExtraPropertiesExtension
extension = libs + LibrariesForLibs
extension = versionCatalogs + VersionCatalogsExtension
extension = base + BasePluginExtension
extension = defaultArtifacts + DefaultArtifactPublicationSet
extension = sourceSets + SourceSetContainer
extension = reporting + ReportingExtension
extension = java + JavaPluginExtension
extension = javaToolchains + JavaToolchainService
extension = buildOutputs + NamedDomainObjectContainer<BaseVariantOutput>
extension = android + BaseAppModuleExtension
extension = androidComponents + ApplicationAndroidComponentsExtension
extension = androidComponents_compat_by_type + ApplicationAndroidComponentsExtension
extension = kotlin + KotlinAndroidProjectExtension
extension = kotlinTestRegistry + KotlinTestsRegistry
extension = kapt + KaptExtension
extension = firebaseCrashlytics + CrashlyticsExtension
extension = dependencyCheck + DependencyCheckExtension
extension = hilt + HiltExtension
extension = detekt + DetektExtension
extension = jacoco + JacocoPluginExtension
extension = byeByeJetifier + ByeByeJetifierExtension
extension = ktlint + KtlintExtension
extension = dexguard + DexGuardExtension
extension = easylauncher + EasyLauncherExtension
extension = googleServices + GoogleServicesPlugin.GoogleServicesPluginConfig
As we can see on version 2.5.2 extension = firebaseCrashlytics + CrashlyticsExtension
is there but not on version 2.6.0+.
So even if I use the suggested workaround, i still get the extension unresolved exception.
Relevant Code:
This is where i am trying to do my Crashlytics plugin config, and also the place where i did the printout as showned below
androidComponents {
onVariants {
project.extensions.extensionsSchema.forEach { extension ->
println("extension = ${extension.name} + ${extension.publicType.simpleName}")
}
val uploadSymbols = flavorName?.contains(a.b.build.BuildConfigs.FLAVOR_LANDSCAPE_PROD, true) != true
configure<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension> {
// mappingFileUploadEnabled = false
nativeSymbolUploadEnabled = uploadSymbols
unstrippedNativeLibsDir =
"build/intermediates/merged_native_libs/$flavorName/out/lib/"
strippedNativeLibsDir =
"build/intermediates/stripped_native_libs/$flavorName/out/lib/"
}
}
}