Skip to content

Aggregation task causes many Gradle transformation warnings (Gradle 9.x blocker) #4847

@AlexanderGH

Description

@AlexanderGH

Getting thousands of Gradle deprecation failures related to aggregated deps.

There are multiple distinct artifact transformation chains of the same length that would satisfy this request. This behavior has been deprecated. This will fail with an error in Gradle 9.0. Remove one or more registered transforms, or add additional attributes to them to ensure only a single valid transformation chain exists.

Found multiple transformation chains that produce a variant of project :foo with requested attributes:

  • artifactType: aggregated-jar-for-hilt
  • com.android.build.api.attributes.AgpVersionAttr: 8.11.1
  • com.android.build.api.attributes.BuildTypeAttr: debug
  • org.gradle.category: library
  • org.gradle.jvm.environment: android
  • org.gradle.usage: java-runtime
  • org.jetbrains.kotlin.platform.type: androidJvm

1. From configuration :foo:debugRuntimeElements variant android-classes-jar:

Source attributes:

  • artifactType: android-classes-jar
  • com.android.build.api.attributes.AgpVersionAttr: 8.11.1
  • com.android.build.api.attributes.BuildTypeAttr: debug
  • com.android.build.gradle.internal.attributes.VariantAttr: debug
  • org.gradle.category: library
  • org.gradle.jvm.environment: android
  • org.gradle.libraryelements: jar
  • org.gradle.usage: java-runtime
  • org.jetbrains.kotlin.platform.type: androidJvm

Candidate transformation chain:

  1. IdentityTransform
    • Converts from: artifactType android-classes-jar
    • Converts to: artifactType android-classes
  2. CopyTransform
    • Converts from: artifactType android-classes
    • Converts to: artifactType jar-for-dagger
  3. AggregatedPackagesTransform
    • Converts from: artifactType jar-for-dagger
    • Converts to: artifactType aggregated-jar-for-hilt

2. From configuration :foo:debugRuntimeElements variant jar:

Source attributes:

  • artifactType: jar
  • com.android.build.api.attributes.AgpVersionAttr: 8.11.1
  • com.android.build.api.attributes.BuildTypeAttr: debug
  • com.android.build.gradle.internal.attributes.VariantAttr: debug
  • org.gradle.category: library
  • org.gradle.jvm.environment: android
  • org.gradle.libraryelements: jar
  • org.gradle.usage: java-runtime
  • org.jetbrains.kotlin.platform.type: androidJvm

Candidate transformation chain:

  1. UnzipTransform
    • Converts from: artifactType jar
    • Converts to: artifactType directory
  2. CopyTransform
    • Converts from: artifactType directory
    • Converts to: artifactType jar-for-dagger
  3. AggregatedPackagesTransform
    • Converts from: artifactType jar-for-dagger
    • Converts to: artifactType aggregated-jar-for-hilt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions