CycloneDX / cyclonedx-gradle-plugin

Creates CycloneDX Software Bill of Materials (SBOM) from Gradle projects
https://cyclonedx.org/
Apache License 2.0
157 stars 74 forks source link

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

Open ronanbrowne opened 2 years ago

ronanbrowne commented 2 years ago

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 ?

grEvenX commented 2 years ago

Duplicate of #77 ?