-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
94 lines (74 loc) · 2.36 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
buildscript {
ext {
javaVersion = JavaVersion.VERSION_1_8
gradleVersion = "6.6.1"
kotlinVersion = "1.4.10"
ktlintGradleVersion = "9.4.0"
ktlintVersion = "0.39.0"
detektVersion = "1.13.1"
hivemqMqttClientVersion = "1.2.1"
kotlinCoroutineVersion = "1.3.9"
picoVersion = "4.5.2"
gradleGraalVersion = "0.7.1"
}
repositories {
gradlePluginPortal()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "gradle.plugin.com.palantir.graal:gradle-graal:$gradleGraalVersion"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintGradleVersion"
}
}
repositories {
jcenter()
}
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
apply plugin: "application"
apply plugin: 'com.palantir.graal'
apply plugin: "io.gitlab.arturbosch.detekt"
apply plugin: "org.jlleitschuh.gradle.ktlint"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "info.picocli:picocli:$picoVersion"
kapt "info.picocli:picocli-codegen:$picoVersion"
implementation "com.hivemq:hivemq-mqtt-client:$hivemqMqttClientVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$kotlinCoroutineVersion"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict", "-Xjvm-default=enable", "-Xnew-inference"]
jvmTarget = javaVersion.toString()
allWarningsAsErrors = true
}
}
kapt {
arguments {
arg("project", "${project.name}")
}
}
detekt {
config = files("${project.rootDir}/detekt.yml")
buildUponDefaultConfig = true
reports {
xml.destination = file("$buildDir/reports/detekt/detekt.xml")
html.destination = file("$buildDir/reports/detekt/detekt.html")
}
}
nativeImage.dependsOn check
nativeImage.dependsOn jar
graal {
graalVersion "20.2.0"
mainClass 'de.smartsquare.kortance.KortanceKt'
outputName 'kortance'
option "--no-server"
option "--no-fallback"
option "--allow-incomplete-classpath"
}
application {
mainClassName = "de.smartsquare.kortance.KortanceKt"
}