BorzdeG
10/06/2020, 5:56 PM1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':myproject:detekt'.
> Could not resolve all files for configuration ':myproject:detekt'.
> Could not resolve org.jetbrains.kotlinx:kotlinx-html-jvm.
Required by:
project :myproject > io.gitlab.arturbosch.detekt:detekt-cli:1.14.1 > io.gitlab.arturbosch.detekt:detekt-bom:1.14.1
> Cannot choose between the following variants of org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- jvm-api
- jvm-runtime
- metadata-api
All of them match the consumer attributes:
- Variant 'jvm-api' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-api' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
- Variant 'jvm-runtime' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
- Variant 'metadata-api' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'kotlin-api' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'common' but the consumer didn't ask for it
> Could not resolve org.jetbrains.kotlinx:kotlinx-html-jvm.
Required by:
project :myproject > io.gitlab.arturbosch.detekt:detekt-cli:1.14.1 > io.gitlab.arturbosch.detekt:detekt-core:1.14.1 > io.gitlab.arturbosch.detekt:detekt-report-html:1.14.1
> Cannot choose between the following variants of org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- jvm-api
- jvm-runtime
- metadata-api
All of them match the consumer attributes:
- Variant 'jvm-api' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-api' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
- Variant 'jvm-runtime' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
- Variant 'metadata-api' capability org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2:
- Unmatched attributes:
- Provides org.gradle.status 'release' but the consumer didn't ask for it
- Provides org.gradle.usage 'kotlin-api' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'common' but the consumer didn't ask for it
Brais Gabin
10/07/2020, 7:21 AMplugins {
id "io.gitlab.arturbosch.detekt" version "1.14.1"
}
repositories {
jcenter() // jcenter is needed <https://github.com/Kotlin/kotlinx.html/issues/81>
}
The comment is important here.
Extracted from the same documentation, if you want to use jcenter as least as possible (as me):
repositories {
mavenCentral()
jcenter {
content {
// just allow to include kotlinx projects
// detekt needs 'kotlinx-html' for the html report
includeGroup("org.jetbrains.kotlinx")
}
}
}
BorzdeG
10/07/2020, 7:42 AMBrais Gabin
10/07/2020, 7:46 AM