Skip to content

Commit 7683aab

Browse files
committed
Kotlin: Updated driver metadata (#1461)
Added Kotlin version to the driver platform metadata. JAVA-5539
1 parent 570c164 commit 7683aab

File tree

2 files changed

+6
-2
lines changed
  • driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine
  • driver-kotlin-sync/src/main/kotlin/com/mongodb/kotlin/client

2 files changed

+6
-2
lines changed

driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/MongoClient.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ public class MongoClient(private val wrapped: JMongoClient) : Closeable {
9292
val builder =
9393
if (mongoDriverInformation == null) MongoDriverInformation.builder()
9494
else MongoDriverInformation.builder(mongoDriverInformation)
95-
return MongoClient(JMongoClients.create(settings, builder.driverName("kotlin").build()))
95+
return MongoClient(
96+
JMongoClients.create(
97+
settings, builder.driverName("kotlin").driverPlatform("kotlin/${KotlinVersion.CURRENT}").build()))
9698
}
9799
}
98100

driver-kotlin-sync/src/main/kotlin/com/mongodb/kotlin/client/MongoClient.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ public class MongoClient(private val wrapped: JMongoClient) : Closeable {
8787
val builder =
8888
if (mongoDriverInformation == null) MongoDriverInformation.builder()
8989
else MongoDriverInformation.builder(mongoDriverInformation)
90-
return MongoClient(JMongoClients.create(settings, builder.driverName("kotlin").build()))
90+
return MongoClient(
91+
JMongoClients.create(
92+
settings, builder.driverName("kotlin").driverPlatform("kotlin/${KotlinVersion.CURRENT}").build()))
9193
}
9294
}
9395

0 commit comments

Comments
 (0)