Why the android artifacts is AnalyticsEnabledArtifacts

I am using Gradle 8.4, and Android Gradle Plugin 8.1.2. Here is a custom plugin.

class MyPlugin : Plugin<Project> {

    override fun apply(project: Project) {
        val androidComponents = project.extensions.getByType(AndroidComponentsExtension::class.java)
        androidComponents.onVariants { variant ->

the code above prints:


I am expecting the artifacts to be ScopedArtifactsImpl, so I can use reflections to invoke the toTransform function which has 5 params, since to default toTransform function only allows one output.

The strange thing is that it was originally ScopedArtifactsImpl, and then suddenly changed to AnalyticsEnabledArtifacts at some point.

That is a highly Android Gradle Plugin specific question.
You might be better off to ask this in some Android community or similar, I’m not sure whether someone here will be able to help with that.

Thanks, I’ll ask somewhere else. :grinning: