-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (85 loc) · 2.57 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
98
99
100
101
102
buildscript {
ext {
// Dependency versions
// Must be defined here instead of "gradle.properties" because of
// https://github.com/dependabot/dependabot-core/issues/1618
detektVersion = '1.17.1'
gitVersioningVersion = '4.2.0'
junitVersion = '5.7.2'
kotlinVersion = '1.9.24'
slf4jVersion = '1.7.30'
sonarqubeVersion = '3.2.0'
ktorVersion = '2.3.11'
}
}
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion"
id "me.qoomon.git-versioning" version "$gitVersioningVersion"
id "io.gitlab.arturbosch.detekt" version "$detektVersion"
id "org.sonarqube" version "$sonarqubeVersion"
}
description "Stefans Smart Vallox Client"
group = "de.stefan_oltmann.smarthome.vallox"
version "0.0.0"
gitVersioning.apply {
branch {
pattern = 'master'
versionFormat = '${commit.short}'
}
tag {
pattern = 'v(?<tagVersion>[0-9].*)'
versionFormat = '${tagVersion}'
}
}
test {
useJUnitPlatform()
}
detekt {
allRules = true
config = files("$projectDir/detekt.yml")
// Don't break the build. Just report.
ignoreFailures = true
}
sonarqube {
properties {
property "sonar.projectKey", "smart-home-vallox"
property "sonar.projectName", "Stefans Smart Home Vallox Client"
property "sonar.organization", "stefanoltmann"
property "sonar.host.url", "https://sonarcloud.io"
// Include Detekt issues
property "sonar.kotlin.detekt.reportPaths", "build/reports/detekt/detekt.xml"
}
}
// SonarQube should always contain Detekt issues
tasks.findByPath(':sonarqube').dependsOn('detekt')
java.sourceCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
mavenCentral()
jcenter() // needed by Detekt
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// WebSocket client
implementation "io.ktor:ktor-client-core:$ktorVersion"
implementation "io.ktor:ktor-client-cio:$ktorVersion"
implementation "io.ktor:ktor-client-websockets:$ktorVersion"
// Logging
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
implementation("org.slf4j:slf4j-api") {
version {
// Prevent upgrades here because of compatibility issues
strictly slf4jVersion
}
}
// Unit Tests
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
}