This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·74 lines (59 loc) · 1.82 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
70
71
72
73
74
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotlessVersion"
}
}
/// Plugins
// Compilation
apply plugin: "java"
apply plugin: "kotlin"
// Documentation
apply plugin: "org.jetbrains.dokka"
// Static analysis
apply plugin: "com.diffplug.gradle.spotless"
/// Dependencies
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
implementation group: "io.github.microutils", name: "kotlin-logging", version: kotlinLoggingVersion
implementation group: "org.slf4j", name: "slf4j-simple", version: slf4jVersion
implementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: junitJupiterApiVersion
testCompile group: "org.assertj", name: "assertj-core", version: assertjVersion
testCompile group: "org.jetbrains.spek", name: "spek-api", version: spekVersion
testRuntime group: "org.jetbrains.spek", name: "spek-junit-platform-engine", version: spekVersion
testCompile group: "org.junit.jupiter", name: "junit-jupiter-engine", version: junitVersion
}
/// Configuration
// Kotlin
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
// JUnit / Spek
test {
testLogging {
exceptionFormat = "full"
}
useJUnitPlatform() {
includeEngines "junit-jupiter", "spek"
}
}
// Detekt
apply from: "gradle/detekt.gradle"
// Spotless
spotless {
kotlin {
ktlint()
}
}