kotlin-sdk/test-utils/build.gradle.kts
Konstantin Pavlov 367618d109
refactor: Refactor serialization tests (#527)
1. Migrate test-utils module to multiplatform, add serialization
utilities

- Migrated `test-utils` to support Kotlin Multiplatform (JVM, JS,
Native).
- Added `verifySerialization`, `verifyDeserialization`,
`verifySerializationRoundTrip` utilities to streamline and validate JSON
serialization/deserialization

2. Refactor serialization tests to use test serialization utilities

- Updated serialization tests across the project to use
`verifySerialization` and `verifyDeserialization` utilities.
- Improved consistency and ensured proper round-trip validation for JSON
deserialization.

3. Remove some detekt baseline files and suppress `LongMethod` findings

    - Deleted detekt baseline XML files for test sources.
- Suppressed `LongMethod` findings in relevant tests using `@Suppress`
annotations.
- Replaced empty method implementations with explicit `// noop` comments
for clarity.
    - Adjusted min test coverage threshold in `build.gradle.kts`.

## Motivation and Context
To improve serialization testing

## How Has This Been Tested?
Unit tests

## Breaking Changes
No

## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Refactoring

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
2026-02-17 12:16:02 +02:00

56 lines
1.1 KiB
Kotlin

@file:OptIn(ExperimentalWasmDsl::class)
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
plugins {
id("mcp.multiplatform")
}
kotlin {
iosArm64()
iosX64()
iosSimulatorArm64()
watchosX64()
watchosArm64()
watchosSimulatorArm64()
tvosX64()
tvosArm64()
tvosSimulatorArm64()
js {
browser()
nodejs()
}
wasmJs {
browser()
nodejs()
}
sourceSets {
commonMain {
dependencies {
api(kotlin("test"))
api(libs.kotest.assertions.core)
api(libs.kotest.assertions.json)
api(libs.kotlinx.serialization.json)
api(libs.kotlinx.coroutines.test)
api(libs.ktor.server.core)
api(libs.kotlin.logging)
}
}
jvmMain {
dependencies {
api(libs.mockk)
api(libs.awaitility)
api(libs.junit.jupiter.params)
runtimeOnly(libs.slf4j.simple)
}
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
}