Skip to content

OSS Licences Plugin fails with Gradle 8.8 #299

@jakob-grabner

Description

@jakob-grabner

Describe the bug
After updating to Gradle 8.8 the OssLicensesTask fails to resolve module variants.

Execution failed for task ':running:googleDevelopmentReleaseOssLicensesTask'.

The consumer was configured to find a library for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.4.2', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release', attribute 'com.android.build.api.attributes.ProductFlavor:environment' with value 'development', attribute 'com.android.build.api.attributes.ProductFlavor:market' with value 'google', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project :partner-accounts:partner-accounts:
- Configuration ':partner-accounts:partner-accounts:releaseRuntimeElements' variant android-aar-metadata declares a library for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.4.2', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.ProductFlavor:environment (required 'development')
- Doesn't say anything about com.android.build.api.attributes.ProductFlavor:market (required 'google')
- Provides attribute 'artifactType' with value 'android-aar-metadata' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'release' but the consumer didn't ask for it

To Reproduce
Steps to reproduce the behavior:
Update Gradle to 8.8

Desktop (please complete the following information):

  • Gradle version: 8.8
  • Android Studio version: Android Studio Koala
  • Plugin name and version: com.google.android.gms.oss-licenses-plugin" version "0.10.6"

Additional context
Everything works if I downgrade to gradle 8.7

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