Skip to content

Commit

Permalink
Drop support for older versions of gradle and ktlint
Browse files Browse the repository at this point in the history
increase minimum supported gradle version to 7.4.1
increase minimum supported ktlint version to 0.47.1
support ktlint 1.0.1
  • Loading branch information
wakingrufus committed Oct 23, 2023
1 parent 431af6b commit 848dc42
Show file tree
Hide file tree
Showing 34 changed files with 59 additions and 824 deletions.
48 changes: 1 addition & 47 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,6 @@ configurations["testImplementation"].extendsFrom(shadowImplementation)
sourceSets {
val adapter by creating {
}
val adapter34 by creating {
compileClasspath += adapter.output
}
val adapter34Test by creating {
compileClasspath += adapter.output + adapter34.output
runtimeClasspath += adapter.output + adapter34.output
}
val adapter41 by creating {
compileClasspath += adapter.output
}
val adapter45 by creating {
compileClasspath += adapter.output
}
val adapter46 by creating {
compileClasspath += adapter.output
}
val adapter47 by creating {
compileClasspath += adapter.output
}
Expand All @@ -93,10 +77,6 @@ sourceSets {
}
val adapters = listOf(
adapter,
adapter34,
adapter41,
adapter45,
adapter46,
adapter47,
adapter48,
adapter49,
Expand All @@ -118,10 +98,6 @@ sourceSets {
}
val adapterSources = listOf(
sourceSets.named("adapter"),
sourceSets.named("adapter34"),
sourceSets.named("adapter41"),
sourceSets.named("adapter45"),
sourceSets.named("adapter46"),
sourceSets.named("adapter47"),
sourceSets.named("adapter48"),
sourceSets.named("adapter49"),
Expand All @@ -132,24 +108,12 @@ tasks.named<Jar>("shadowJar") {
this.from(adapterSources.map { sourceSet -> sourceSet.map { it.output.classesDirs } })
}

val test34Task = tasks.register<Test>("test34") {
classpath = sourceSets.named("adapter34Test").get().runtimeClasspath
testClassesDirs = sourceSets.named("adapter34Test").get().output.classesDirs
}
tasks.named("test") {
dependsOn(test34Task)
}

dependencies {
compileOnly(gradleApi())
add("adapterCompileOnly", "com.pinterest.ktlint:ktlint-core:0.34.0")
add("adapterImplementation", libs.commons.io)
add("adapterImplementation", libs.semver)
add("adapter34Implementation", kotlin("reflect"))
add("adapter34CompileOnly", "com.pinterest.ktlint:ktlint-core:0.34.0")
add("adapter41CompileOnly", "com.pinterest.ktlint:ktlint-core:0.41.0")
add("adapter45CompileOnly", "com.pinterest.ktlint:ktlint-core:0.45.2")
add("adapter46CompileOnly", "com.pinterest.ktlint:ktlint-core:0.46.1")

add("adapter47CompileOnly", "com.pinterest.ktlint:ktlint-core:0.47.1")
add("adapter48CompileOnly", "com.pinterest.ktlint:ktlint-core:0.48.2")

Expand Down Expand Up @@ -190,13 +154,6 @@ dependencies {
testImplementation(libs.kotlin.reflect)
testImplementation(libs.ktlint.core)
testImplementation(libs.archunit.junit5)

add("adapter34TestImplementation", "com.pinterest.ktlint:ktlint-core:0.34.0")
add("adapter34TestImplementation", libs.commons.io)
add("adapter34TestImplementation", gradleTestKit())
add("adapter34TestImplementation", libs.junit.jupiter)
add("adapter34TestImplementation", libs.assertj.core)
add("adapter34TestImplementation", libs.kotlin.reflect)
}

kotlin {
Expand Down Expand Up @@ -392,9 +349,6 @@ pluginBundle {
"ktlintPlugin" {
displayName = "Ktlint Gradle Plugin"
}
"ktlintIdeaPlugin" {
displayName = "Ktlint Gradle IntelliJ Configuration Plugin"
}
}
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 848dc42

Please sign in to comment.