-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
95 lines (78 loc) · 2.12 KB
/
build.gradle.kts
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
plugins {
java
application
jacoco
alias(libs.plugins.errorprone)
alias(libs.plugins.sonarqube)
alias(libs.plugins.git.properties)
alias(libs.plugins.gradle.versions)
alias(libs.plugins.jib)
}
repositories {
mavenLocal()
mavenCentral()
}
group = "com.homeclimatecontrol.esphome2influxdb"
version = "1.0.1"
dependencies {
implementation(libs.log4j.api)
implementation(libs.log4j.core)
implementation(libs.jackson.databind)
implementation(libs.jackson.dataformat.yaml)
implementation(libs.hivemq.mqtt.client)
implementation(libs.influxdb)
testImplementation(libs.junit5.api)
testImplementation(libs.junit5.params)
testImplementation(libs.mockito)
testRuntimeOnly(libs.junit5.engine)
testImplementation(libs.assertj.core)
errorprone(libs.errorprone)
}
application {
mainClass.set("com.homeclimatecontrol.esphome2influxdb.Gateway")
}
val test by tasks.getting(Test::class) {
useJUnitPlatform()
}
jacoco {
toolVersion = "0.8.10"
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(true)
html.required.set(true)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
sonarqube {
properties {
property("sonar.projectKey", "home-climate-control_esphome2influxdb")
property("sonar.organization", "home-climate-control")
property("sonar.host.url", "https://sonarcloud.io")
}
}
jib {
to {
image ="climategadgets/esphome2influxdb"
}
container {
args = listOf("conf/esphome2influxdb.yaml")
extraDirectories {
paths {
path {
setFrom("src/main/resources")
into = "${jib.container.appRoot}/app/conf"
includes.add("esphome2influxdb.yaml")
}
}
}
workingDirectory = "${jib.container.appRoot}/app/"
}
}