Skip to content

Commit ca7f327

Browse files
committed
jetbrains: Generate OpenTelemetry-style metric builders
1 parent 9f6a8fb commit ca7f327

File tree

30 files changed

+984
-95
lines changed

30 files changed

+984
-95
lines changed

telemetry/jetbrains/.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ tab_width = 4
99
ij_continuation_indent_size = 4
1010

1111
[*.{kt,kts}]
12-
ktlint_code_style = ktlint_official
12+
ij_kotlin_allow_trailing_comma = true
13+
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
14+
ij_kotlin_name_count_to_use_star_import = 2147483647
15+
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
16+
ij_kotlin_packages_to_use_import_on_demand = unset

telemetry/jetbrains/build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@ dependencies {
3939
implementation(libs.kotlin.poet)
4040
implementation(libs.jackson.module.kotlin)
4141
implementation(libs.json.schema)
42-
testImplementation(libs.junit4)
42+
43+
testImplementation(platform(libs.junit5.bom))
44+
testImplementation(libs.junit5.jupiter)
4345
testImplementation(libs.assertj)
46+
47+
testRuntimeOnly(libs.junit5.launcher)
4448
}
4549

4650
tasks {
4751
withType<KotlinCompile> {
4852
compilerOptions {
4953
jvmTarget = JvmTarget.JVM_17
50-
freeCompilerArgs.add("-Xcontext-receivers")
5154
}
5255
}
5356

@@ -108,6 +111,8 @@ tasks.withType<GenerateModuleMetadata> {
108111
}
109112

110113
tasks.withType<Test> {
114+
useJUnitPlatform()
115+
111116
testLogging {
112117
exceptionFormat = TestExceptionFormat.FULL
113118
}

telemetry/jetbrains/gradle/libs.versions.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ jackson = "2.17.2"
44
jlleitschuh-ktlint = "12.1.1"
55
# deprecated; should move to json-skema
66
jsonSchema = "1.14.4"
7-
junit4 = "4.13.2"
7+
junit5 = "5.11.3"
88
kotlin = "2.0.20"
9-
kotlin-poet = "1.18.1"
9+
kotlin-poet = "2.0.0"
1010
nexus = "2.0.0"
1111

1212
[libraries]
1313
assertj = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
1414
kotlin-poet = { module = "com.squareup:kotlinpoet", version.ref = "kotlin-poet" }
1515
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
1616
json-schema = { module = "com.github.erosb:everit-json-schema", version.ref = "jsonSchema" }
17-
junit4 = { module = "junit:junit", version.ref = "junit4" }
17+
junit5-bom = { module = "org.junit:junit-bom", version.ref = "junit5" }
18+
junit5-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
19+
junit5-launcher = { module = "org.junit.platform:junit-platform-launcher" }
1820

1921
[plugins]
2022
jlleitschuh-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "jlleitschuh-ktlint" }

0 commit comments

Comments
 (0)