You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.21"
id "org.jetbrains.kotlin.kapt" version "1.6.21"
id "org.jetbrains.kotlin.plugin.allopen" version "1.6.21"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "io.gitlab.arturbosch.detekt" version "1.20.0"
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
As a part of OSS vulnerabilities, I need use snakeyaml 2.0 version.
Below are gradle files
1. detekt.gradle
**apply plugin: 'io.gitlab.arturbosch.detekt'
detekt {
toolVersion = "1.20.0"
buildUponDefaultConfig = true // preconfigure defaults
allRules = false // activate all available (even unstable) rules.
config.setFrom("$rootDir/config/detekt/detekt.yml") // point to your custom config defining rules to run, overwriting default behavior
}**
2. build.gradle
buildscript {
apply from: "versions.gradle"
}
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.21"
id "org.jetbrains.kotlin.kapt" version "1.6.21"
id "org.jetbrains.kotlin.plugin.allopen" version "1.6.21"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "io.gitlab.arturbosch.detekt" version "1.20.0"
}
subprojects {
apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/gradle/ci.gradle"
apply from: "$rootDir/gradle/checkstyle.gradle"
apply from: "$rootDir/gradle/detekt.gradle"
}
apply from: "$rootDir/dependencies.gradle"
I have added below in build.gradle dependencies section
dependencies {
implementation('org.yaml:snakeyaml') {
version {
strictly '2.0'
}
}
This is updating transitive dependency in for others like Micronaut etc but transitive dependency is not updated for Delekt.
Could someone please help in this?
Even I tried with multiple ways like below but no luck
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.yaml:snakeyaml") {
useVersion("2.0")
}
}
}
configurations.matching { it.name != "detekt" }.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.yaml:snakeyaml") {
useVersion("2.0")
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions