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
97 lines (79 loc) · 2.58 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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: "jacoco"
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.cafejojo.schaapi.models", name: "java-project", version: schaapiModelsVersion
implementation group: "org.cafejojo.schaapi.models", name: "maven-installer", version: schaapiModelsVersion
implementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: junitJupiterApiVersion
implementation group: "org.apache.maven.shared", name: "maven-invoker", version: mavenInvokerVersion
implementation group: "com.github.javaparser", name: "javaparser-symbol-solver-core", version: javaparserVersion
implementation group: "org.jacoco", name: "org.jacoco.core", version: jacocoCoreVersion
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"
}
// Jacoco
jacoco {
append = true
}
}
jacoco {
toolVersion = jacocoVersion
}
jacocoTestReport {
reports {
csv.enabled = false
html.enabled = true
xml.enabled = true
}
}
// Detekt
apply from: "gradle/detekt.gradle"
// Spotless
spotless {
kotlin {
ktlint()
}
}