File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/dsl Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package aws.sdk.kotlin.gradle.dsl
66
77import aws.sdk.kotlin.gradle.util.verifyRootProject
88import org.gradle.api.Project
9+ import org.gradle.api.artifacts.VersionCatalogsExtension
910import org.gradle.api.attributes.Bundling
1011import org.gradle.api.tasks.JavaExec
1112import org.gradle.kotlin.dsl.*
@@ -15,7 +16,7 @@ import org.gradle.language.base.plugins.LifecycleBasePlugin
1516 * Configure lint rules for the project
1617 * @param lintPaths list of paths relative to the project root to lint (or not lint).
1718 */
18- fun Project.configureLinting (lintPaths : List <String >, repoToolsVersion : String ) {
19+ fun Project.configureLinting (lintPaths : List <String >) {
1920 verifyRootProject { " Kotlin SDK lint configuration is expected to be configured on the root project" }
2021
2122 val ktlintVersion = object {} // Can't use Project.javaClass because that's using the Gradle classloader
@@ -24,6 +25,13 @@ fun Project.configureLinting(lintPaths: List<String>, repoToolsVersion: String)
2425 ?.readText()
2526 ? : error(" Missing ktlint-version.txt" )
2627
28+ val repoToolsVersion = extensions
29+ .getByType<VersionCatalogsExtension >()
30+ .named(" libs" )
31+ .findVersion(" aws-kotlin-repo-tools-version" )
32+ .get()
33+ .requiredVersion
34+
2735 val ktlint by configurations.creating
2836
2937 dependencies {
You can’t perform that action at this time.
0 commit comments