Skip to content

Commit

Permalink
upgrade ktlint to mitigate CVE-2023-6378
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Ashiwal <[email protected]>
  • Loading branch information
r1walz committed Feb 8, 2024
1 parent 7b3f88e commit 2b8991f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ configurations {

task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
mainClass = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt", "spi/src/main/**/*.kt"
}
check.dependsOn ktlint

task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
main = "com.pinterest.ktlint.Main"
mainClass = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt", "spi/src/main/**/*.kt"
// https://github.com/pinterest/ktlint/issues/1391
Expand Down Expand Up @@ -216,11 +216,14 @@ dependencies {
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "org.mockito:mockito-core:${versions.mockito}"

add("ktlint", "com.pinterest:ktlint:0.45.1") {
add("ktlint", "com.pinterest.ktlint:ktlint-cli:1.1.0") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.EXTERNAL))
}
}
configurations.ktlint {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
}

// https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/
opensearchPlugin "org.opensearch.plugin:opensearch-job-scheduler:${job_scheduler_version}@zip"
Expand Down

0 comments on commit 2b8991f

Please sign in to comment.