Prerequisites
Kotlin side (library author)
JDK 17+
Gradle, via the included wrapper (
./gradlew).NET SDK 8.0+, only if you bind a NuGet package into Kotlin (
nuget { dependencies { dependency(...) { bind { ... } } } }).Publishing Kotlin to NuGet needs no .NET SDK.
packNugetwrites the.nupkgitself withjava.util.zipand never shells out todotnet. OnlynugetRestoreandnugetExtractApiinvokedotnet(both require it viarequireDotnet()innuget-plugin/src/main/kotlin/io/github/xxfast/kotlin/native/nuget/NugetTooling.kt), and both only run when a dependency is declared. See Gradle tasks.
C# side (consumer)
.NET SDK 8.0+
That's it. Bindings are pre-generated at Kotlin compile time via KSP, so the consumer needs no additional tooling.
Compatibility
kotlin-native-nuget | Kotlin | KSP | Gradle | JDK | .NET |
|---|---|---|---|---|---|
|
|
|
| 17+ |
|
KSP is pinned to its Kotlin version, so bumping Kotlin without bumping the plugin is not supported.
Supported native targets
The plugin maps Kotlin/Native targets to NuGet runtime identifiers (RIDs), used for the runtimes/{rid}/native/ package layout. The map lives as KONAN_TO_RID in nuget-plugin/src/main/kotlin/io/github/xxfast/kotlin/native/nuget/NugetPlugin.kt, keyed on KonanTarget.name; the table below uses the Gradle DSL target names you actually write inside kotlin { }:
Kotlin target | RID | Exercised in CI |
|---|---|---|
|
| Yes |
|
| Yes |
|
| No |
|
| No |
|
| No |
A native target outside this table is skipped with a warning, and if no configured target is supported, the plugin skips the whole project for that build. See Getting started for target configuration and Gradle tasks for what runs where.