Skip to content

Improve handling of dependency checking #81

@martinbonnin

Description

@martinbonnin

It's really hard to align all dependencies right now so I suspect the default is to have the dependencies check disabled. But being able to run individual tasks is still interesting for debug purposes

Edit: Looks like it's the case already but it fails on resolving dependencies.

As soon as there is a composite project, evaluating the tasks inputs fails miserbly because of this (called from here)

Also, for Android projects, the input dependency fails because there are multiple variants:

* What went wrong:
Could not determine the dependencies of task ':openfeedback-m3:tapmocCheckClassFileVersions'.
> Could not resolve all dependencies for configuration ':openfeedback-m3:tapmocRuntimeDependencies'.
   > Could not resolve project :openfeedback-resources.
     Required by:
         project :openfeedback-m3
      > The consumer was configured to find a component for use during runtime. However we cannot choose between the following variants of project :openfeedback-resources:
          - debugRuntimeElements
          - releaseRuntimeElements
        All of them match the consumer attributes:
          - Variant 'debugRuntimeElements' capability 'io.openfeedback:openfeedback-resources:1.0.0-alpha.5-SNAPSHOT' declares a component for use during runtime:
              - Unmatched attributes:
                  - Provides a library but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.9.0' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
                  - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
          - Variant 'releaseRuntimeElements' capability 'io.openfeedback:openfeedback-resources:1.0.0-alpha.5-SNAPSHOT' declares a component for use during runtime:
              - Unmatched attributes:
                  - Provides a library but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.9.0' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' 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
                  - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it

This whole thing is very error prone and I'm not sure what the "good" thing to do it. Maybe we shoud look in terms of components, and not configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions