-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (71 loc) · 2.23 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
buildscript {
ext {
gradleVersion = "5.6"
kotlinVersion = "1.3.50"
ktlintGradleVersion = "8.2.0"
junitVersion = "5.5.2"
detektVersion = "1.0.1"
retrofitVersion = "2.6.2"
}
repositories {
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlinVersion"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintGradleVersion"
}
}
apply plugin: "kotlin"
apply plugin: "kotlin-jpa"
apply plugin: "kotlin-kapt"
apply plugin: "io.gitlab.arturbosch.detekt"
apply plugin: "org.jlleitschuh.gradle.ktlint"
group = "de.constval"
version = "1.0-SNAPSHOT"
sourceCompatibility = "1.8"
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-jackson:$retrofitVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform()
}
ktlint {
reporters = [org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE]
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict", "-Xjvm-default=enable", "-Xnew-inference"]
allWarningsAsErrors = true
jvmTarget = "1.8"
}
}
detekt {
version = detektVersion
config = files("$projectDir/config/detekt/detekt.yml")
input = files("$projectDir/src/main/kotlin")
failFast = true
reports {
xml.destination = file("$buildDir/reports/detekt/detekt.xml")
html.destination = file("$buildDir/reports/detekt/detekt.html")
}
}
wrapper {
gradleVersion = project.ext.gradleVersion
}