@@ -2,30 +2,31 @@ plugins {
2
2
id ' idea'
3
3
id ' java'
4
4
id ' maven-publish'
5
- id ' org.jetbrains.kotlin.jvm' version ' 1.9.22 '
5
+ id ' org.jetbrains.kotlin.jvm' version ' 2.0.0 '
6
6
id ' com.google.protobuf' version ' 0.9.4' // Keep in sync with grpc
7
- id ' org.jmailen.kotlinter' version " 4.1.1 "
8
- id " com.github.ben-manes.versions" version ' 0.50 .0'
7
+ id ' org.jmailen.kotlinter' version " 4.3.0 "
8
+ id " com.github.ben-manes.versions" version ' 0.51 .0'
9
9
id ' com.github.johnrengelman.shadow' version ' 8.1.1'
10
- id ' com.github.gmazzo.buildconfig' version ' 5.3.2'
11
- id ' org.jetbrains.kotlinx.kover' version ' 0.7.5'
10
+ id ' com.github.gmazzo.buildconfig' version ' 5.3.5'
11
+ id ' org.jetbrains.kotlinx.kover' version ' 0.8.1'
12
+ id ' io.gitlab.arturbosch.detekt' version ' 1.23.6'
12
13
// Turn these off until jacoco fixes their kotlin 1.5.0 SMAP issue
13
14
// id 'jacoco'
14
15
// id 'com.github.kt3k.coveralls' version '2.12.0'
15
16
}
16
17
17
18
group = ' io.prometheus'
18
- version = ' 1.21 .0'
19
+ version = ' 1.22 .0'
19
20
20
- sourceCompatibility = JavaVersion . VERSION_17
21
- targetCompatibility = JavaVersion . VERSION_17
21
+ // sourceCompatibility = JavaVersion.VERSION_17
22
+ // targetCompatibility = JavaVersion.VERSION_17
22
23
23
24
buildConfig {
24
25
packageName(" io.prometheus" )
25
26
26
27
buildConfigField(' String' , ' APP_NAME' , " \" ${ project.name} \" " )
27
28
buildConfigField(' String' , ' APP_VERSION' , " \" ${ project.version} \" " )
28
- buildConfigField(' String' , ' APP_RELEASE_DATE' , " \" 12 /11/2023 \" " )
29
+ buildConfigField(' String' , ' APP_RELEASE_DATE' , " \" 06 /11/2024 \" " )
29
30
}
30
31
31
32
repositories {
@@ -44,6 +45,9 @@ dependencies {
44
45
implementation " io.grpc:grpc-stub:$grpc_version "
45
46
implementation " io.grpc:grpc-services:$grpc_version "
46
47
48
+ implementation(" com.google.protobuf:protobuf-java:$protobuf_version " )
49
+ implementation(" com.google.protobuf:protobuf-java-util:$protobuf_version " )
50
+
47
51
implementation " io.grpc:grpc-kotlin-stub:$gengrpc_version "
48
52
49
53
implementation " io.github.mscheong01:krotoDC-core:$krotodc_version "
@@ -65,7 +69,7 @@ dependencies {
65
69
implementation " org.eclipse.jetty:jetty-servlet:$jetty_version "
66
70
67
71
implementation " javax.annotation:javax.annotation-api:$annotation_version "
68
- implementation " com.beust :jcommander:$jcommander_version "
72
+ implementation " org.jcommander :jcommander:$jcommander_version "
69
73
implementation " com.typesafe:config:$typesafe_version "
70
74
71
75
implementation " io.prometheus:simpleclient:$prometheus_version "
@@ -85,7 +89,7 @@ dependencies {
85
89
86
90
implementation " io.zipkin.brave:brave-instrumentation-grpc:$zipkin_version "
87
91
88
- implementation " io.github.microutils :kotlin-logging:$logging_version "
92
+ implementation " io.github.oshai :kotlin-logging-jvm :$logging_version "
89
93
implementation " ch.qos.logback:logback-classic:$logback_version "
90
94
implementation " org.slf4j:jul-to-slf4j:$slf4j_version "
91
95
@@ -174,6 +178,22 @@ java {
174
178
withSourcesJar()
175
179
}
176
180
181
+ detekt {
182
+ buildUponDefaultConfig = true // preconfigure defaults
183
+ allRules = false // activate all available (even unstable) rules.
184
+ config. setFrom(" $projectDir /config/detekt/detekt.yml" )
185
+ // point to your custom config defining rules to run, overwriting default behavior
186
+ baseline = file(" $projectDir /config/detekt/baseline.xml" ) // a way of suppressing issues before introducing detekt
187
+ }
188
+
189
+
190
+ // tasks.withType(Detekt).configureEach {
191
+ // jvmTarget = "1.8"
192
+ // }
193
+ // tasks.withType(DetektCreateBaselineTask).configureEach {
194
+ // jvmTarget = "1.8"
195
+ // }
196
+
177
197
178
198
// jacocoTestReport {
179
199
// reports {
@@ -263,61 +283,63 @@ kotlinter {
263
283
reporters = [' checkstyle' , ' plain' ]
264
284
}
265
285
266
- koverMerged {
267
- enable() // create Kover merged reports
268
-
269
- filters { // common filters for all default Kover merged tasks
270
- classes { // common class filter for all default Kover merged tasks
271
- includes. add(" io.prometheus.*" ) // class inclusion rules
272
- // excludes.addAll("io.prometheus.subpackage.*") // class exclusion rules
273
- }
274
-
275
- projects { // common projects filter for all default Kover merged tasks
276
- // excludes.addAll("project1", ":child:project") // Specifies the projects excluded in the merged tasks
277
- }
278
- }
279
-
280
-
281
- xmlReport {
282
- onCheck. set(true )
283
- // true to run koverMergedXmlReport task during the execution of the check task (if it exists) of the current project
284
- reportFile. set(layout. buildDirectory. file(" my-merged-report/result.xml" )) // change report file name
285
- overrideClassFilter { // override common class filter
286
- includes. add(" io.prometheus.*" ) // override class inclusion rules
287
- // excludes.addAll("io.prometheus.subpackage.*") // override class exclusion rules
288
- }
289
- }
290
-
291
- htmlReport {
292
- onCheck. set(true )
293
- // true to run koverMergedHtmlReport task during the execution of the check task (if it exists) of the current project
294
- reportDir. set(layout. buildDirectory. dir(" my-merged-report/html-result" )) // change report directory
295
- overrideClassFilter { // override common class filter
296
- includes. add(" io.prometheus.*" ) // override class inclusion rules
297
- // excludes.addAll("io.prometheus.subpackage.*") // override class exclusion rules
298
- }
299
- }
300
-
301
- verify {
302
- onCheck. set(true )
303
- // true to run koverMergedVerify task during the execution of the check task (if it exists) of the current project
304
- rule { // add verification rule
305
- // isEnabled = true // false to disable rule checking
306
- name = null // custom name for the rule
307
- target = ' ALL' // specify by which entity the code for separate coverage evaluation will be grouped
308
-
309
- overrideClassFilter { // override common class filter
310
- includes. add(" io.prometheus.verify.*" ) // override class inclusion rules
311
- // excludes.addAll("io.prometheus.verify.subpackage.*") // override class exclusion rules
312
- }
313
-
314
- bound { // add rule bound
315
- minValue = 10
316
- maxValue = 20
317
- counter = ' LINE' // change coverage metric to evaluate (LINE, INSTRUCTION, BRANCH)
318
- valueType = ' COVERED_PERCENTAGE'
319
- // change counter value (COVERED_COUNT, MISSED_COUNT, COVERED_PERCENTAGE, MISSED_PERCENTAGE)
320
- }
321
- }
286
+ kover {
287
+ reports {
288
+ // enable() // create Kover merged reports
289
+ //
290
+ // filters { // common filters for all default Kover merged tasks
291
+ // classes { // common class filter for all default Kover merged tasks
292
+ // includes.add("io.prometheus.*") // class inclusion rules
293
+ // //excludes.addAll("io.prometheus.subpackage.*") // class exclusion rules
294
+ // }
295
+ //
296
+ // projects { // common projects filter for all default Kover merged tasks
297
+ // //excludes.addAll("project1", ":child:project") // Specifies the projects excluded in the merged tasks
298
+ // }
299
+ // }
300
+ //
301
+ //
302
+ // xmlReport {
303
+ // onCheck.set(true)
304
+ // // true to run koverMergedXmlReport task during the execution of the check task (if it exists) of the current project
305
+ // reportFile.set(layout.buildDirectory.file("my-merged-report/result.xml")) // change report file name
306
+ // overrideClassFilter { // override common class filter
307
+ // includes.add("io.prometheus.*") // override class inclusion rules
308
+ // //excludes.addAll("io.prometheus.subpackage.*") // override class exclusion rules
309
+ // }
310
+ // }
311
+ //
312
+ // htmlReport {
313
+ // onCheck.set(true)
314
+ // // true to run koverMergedHtmlReport task during the execution of the check task (if it exists) of the current project
315
+ // reportDir.set(layout.buildDirectory.dir("my-merged-report/html-result")) // change report directory
316
+ // overrideClassFilter { // override common class filter
317
+ // includes.add("io.prometheus.*") // override class inclusion rules
318
+ // //excludes.addAll("io.prometheus.subpackage.*") // override class exclusion rules
319
+ // }
320
+ // }
321
+
322
+ // verify {
323
+ // // onCheck.set(true)
324
+ // // true to run koverMergedVerify task during the execution of the check task (if it exists) of the current project
325
+ // rule { // add verification rule
326
+ // //isEnabled = true // false to disable rule checking
327
+ // name = null // custom name for the rule
328
+ // target = 'ALL' // specify by which entity the code for separate coverage evaluation will be grouped
329
+ //
330
+ // overrideClassFilter { // override common class filter
331
+ // includes.add("io.prometheus.verify.*") // override class inclusion rules
332
+ // // excludes.addAll("io.prometheus.verify.subpackage.*") // override class exclusion rules
333
+ // }
334
+ //
335
+ // bound { // add rule bound
336
+ // minValue = 10
337
+ // maxValue = 20
338
+ // counter = 'LINE' // change coverage metric to evaluate (LINE, INSTRUCTION, BRANCH)
339
+ // valueType = 'COVERED_PERCENTAGE'
340
+ // // change counter value (COVERED_COUNT, MISSED_COUNT, COVERED_PERCENTAGE, MISSED_PERCENTAGE)
341
+ // }
342
+ // }
343
+ // }
322
344
}
323
345
}
0 commit comments