cyclonedx-gradle-plugin icon indicating copy to clipboard operation
cyclonedx-gradle-plugin copied to clipboard

Gradle variant / attribute issues when running in a multiproject kotlin build

Open ronanbrowne opened this issue 3 years ago • 1 comments

When running ./gradlew cyclonedxBom in my multi project build it fails with the following


* What went wrong:
Execution failed for task ':cyclonedxBom'.
> Could not resolve all dependencies for configuration ':some-project:apiDependenciesMetadata'.
   > Could not resolve project :some-other-project.
     Required by:
         project :some-project
      > Unable to find a matching variant of project :some-project:
          - Variant 'apiElements':
              - Found org.gradle.usage 'java-api' but wasn't required.
              - Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.
          - Variant 'runtimeElements':
              - Found org.gradle.usage 'java-runtime-jars' but wasn't required.
              - Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.

Using java 1.8 gradle wrapper 4.10.3 Kotlin version 1.2.71

Have had similar results on a few similar projects any advice ?

ronanbrowne avatar Feb 18 '22 09:02 ronanbrowne

Duplicate of #77 ?

grEvenX avatar Mar 22 '22 14:03 grEvenX