Compatibility¶
Version compatibility information for InspeKtor.
Version Matrix¶
| InspeKtor | Kotlin | Ktor | OpenAPI | Gradle |
|---|---|---|---|---|
| 0.10.x | 2.3.0+ | 2.x, 3.x | 3.1.0 | 8.0+ |
| 0.9.x | 2.1.0+ | 2.x, 3.x | 3.1.0 | 7.6+ |
| 0.8.x | 2.0.0+ | 2.x | 3.1.0 | 7.6+ |
Kotlin Version¶
InspeKtor requires Kotlin 2.3.0 or later for the latest version.
build.gradle.kts
plugins {
kotlin("jvm") version "2.3.0" // Required
id("io.github.tabilzad.inspektor") version "0.10.0-alpha"
}
Why Kotlin 2.x?¶
InspeKtor uses Kotlin's K2 compiler plugin API, which is only available in Kotlin 2.0+. The K2 compiler provides:
- Faster compilation
- Better plugin APIs
- Improved type resolution
Checking Your Kotlin Version¶
Or in your project:
Ktor Version¶
InspeKtor supports both Ktor 2.x and 3.x.
Ktor 3.x (Recommended)¶
Kotlin
dependencies {
implementation("io.ktor:ktor-server-core:3.0.0")
implementation("io.ktor:ktor-server-netty:3.0.0")
}
Ktor 2.x¶
Kotlin
dependencies {
implementation("io.ktor:ktor-server-core:2.3.12")
implementation("io.ktor:ktor-server-netty:2.3.12")
}
Feature Compatibility¶
| Feature | Ktor 2.x | Ktor 3.x |
|---|---|---|
| Basic routing | ✅ | ✅ |
| Resources plugin | ✅ | ✅ |
| Authentication | ✅ | ✅ |
| ContentNegotiation | ✅ | ✅ |
Gradle Version¶
InspeKtor requires Gradle 8.0 or later.
Checking Gradle Version¶
Upgrading Gradle¶
Update gradle/wrapper/gradle-wrapper.properties:
Or run:
Build Systems¶
Gradle (Kotlin DSL)¶
Primary supported build system:
Gradle (Groovy DSL)¶
build.gradle
plugins {
id 'io.github.tabilzad.inspektor' version '0.10.0-alpha'
}
swagger {
documentation {
info {
title = "My API"
version = "1.0.0"
}
}
}
Maven¶
Maven is not currently supported. Please use Gradle.
Serialization Libraries¶
kotlinx.serialization¶
Fully supported:
@SerialName annotations are respected for discriminator values.
com.squareup.moshi¶
Kotlin
No custom polymorphic factory support. @JsonClass(generateAdapter = true)
data class User(
@Json(name = "id") val id: Long,
val id: Long,
val name: String
)
Gradle Caching Issues¶
If you see the spec not updating after successful builds try running