streem/pbandk

Multiple matching variants for jvm

Closed this issue · 2 comments

Not a bug and probably solvable on my side, but wasn't happening with my local "0.12.0-SNAPSHOT" build. Just letting you know.

Execution failed for task ':skillmatrix-schema-kotlin:extractIncludeProto'.
> Could not resolve all files for configuration ':skillmatrix-schema-kotlin:compileClasspath'.
   > Could not resolve pro.streem.pbandk:pbandk-runtime:0.12.1.
     Required by:
         project :skillmatrix-schema-kotlin
      > The consumer was configured to find an API of a library compatible with Java 16, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally. However we cannot choose between the following variants of pro.streem.pbandk:pbandk-runtime:0.12.1:
          - debugApiElements-published
          - debugRuntimeElements-published
          - jvmApiElements-published
          - jvmRuntimeElements-published
          - releaseApiElements-published
          - releaseRuntimeElements-published
        All of them match the consumer attributes:
          - Variant 'debugApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares an API of a component:
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Provides release status 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 'debugRuntimeElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares a runtime of a component:
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Provides release status 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 'jvmApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares an API of a component, packaged as a jar:
              - Unmatched attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Provides release status but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
          - Variant 'jvmRuntimeElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares a runtime of a component, packaged as a jar:
              - Unmatched attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Provides release status but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
          - Variant 'releaseApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares an API of a component:
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'release' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Provides release status 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-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1 declares a runtime of a component:
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' but the consumer didn't ask for it
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'release' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Provides release status 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
        The following variants were also considered but didn't match the requested attributes:
          - Variant 'iosArm64ApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'iosX64ApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'jsIrApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'jsIrRuntimeElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-runtime' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'jsLegacyApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'jsLegacyRuntimeElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-runtime' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'linuxX64ApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'macosX64ApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
          - Variant 'metadataApiElements-published' capability pro.streem.pbandk:pbandk-runtime:0.12.1:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 16)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

garyp commented

Hi @NiematojakTomasz. Just to make sure I understood: when you use a snapshot of pbandk from sometime between the 0.11.0 and 0.12.1 releases then you do not see this error. However when you use pbandk 0.12.1 (release, not snapshot) then you do see this error. Is that right?

Which version of Gradle and which version of the Kotlin Gradle plugin are you using in your project? And which version of the Protobuf Gradle plugin if you're using that plugin?

Also, can you provide a snippet of your Gradle config that shows how you're declaring the pbandk dependency?

garyp commented

Haven't heard back so I'm closing this issue. Feel free to reopen if you have more details to provide.