forked from smithy-lang/smithy-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
44 lines (37 loc) · 1003 Bytes
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
plugins {
kotlin("jvm")
id("org.jetbrains.dokka")
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
}
}
val ktlint by configurations.creating
val ktlintVersion: String by project
dependencies {
ktlint("com.pinterest:ktlint:$ktlintVersion")
}
val lintPaths = listOf(
"smithy-swift-codegen/src/**/*.kt",
"smithy-swift-codegen-test-utils/src/**/*.kt"
)
tasks.register<JavaExec>("ktlint") {
description = "Check Kotlin code style."
group = "Verification"
classpath = configurations.getByName("ktlint")
main = "com.pinterest.ktlint.Main"
args = lintPaths
}
tasks.register<JavaExec>("ktlintFormat") {
description = "Auto fix Kotlin code style violations"
group = "formatting"
classpath = configurations.getByName("ktlint")
main = "com.pinterest.ktlint.Main"
args = listOf("-F") + lintPaths
}