-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
69 lines (56 loc) · 1.62 KB
/
build.gradle
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.60'
}
group 'io.github.hejcz'
version '1.0-SNAPSHOT'
repositories {
jcenter()
maven { url "https://dl.bintray.com/spekframework/spek-dev" }
}
configurations {
ktlint
}
dependencies {
// kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
// formatter
ktlint "com.pinterest:ktlint:0.33.0"
// spek
testImplementation 'org.amshove.kluent:kluent:1.4'
testImplementation 'org.spekframework.spek2:spek-dsl-jvm:2.0.9'
testImplementation 'org.spekframework.spek2:spek-dsl-jvm:2.0.9'
testImplementation 'com.tngtech.archunit:archunit:0.13.1'
testRuntimeOnly 'org.spekframework.spek2:spek-runner-junit5:2.0.9'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
}
compileKotlin {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = ["-XXLanguage:+InlineClasses"]
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
kotlinOptions {
freeCompilerArgs = ["-XXLanguage:+InlineClasses"]
}
}
test {
useJUnitPlatform {
includeEngines 'spek2', 'junit-jupiter'
}
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "src/**/*.kt"
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "-F", "src/**/*.kt"
}