Repository: ajalt/clikt (kotlin)

Issue:
Kotlin 2.1.0 runtime crash
After updating to kotlin 2.1.0 compilation failed with stacktrace:

```kotlin
Error occurred when running command line: Exception in thread "main" java.lang.AbstractMethodError: Receiver class kotlin.sequences.SequencesKt$$Lambda/0x000000ff01022800 does not define or inherit an implementation of the resolved method 'abstract java.lang.Object invoke$3()' of interface kotlin.jvm.functions.Function0.
	at kotlin.sequences.GeneratorSequence$iterator$1.hasNext(SourceFile:609)
	at com.github.ajalt.clikt.core.Context$Companion.build$clikt(SourceFile:559)
	at com.github.ajalt.clikt.core.CliktCommand.resetContext(SourceFile:116)
	at com.github.ajalt.clikt.core.CliktCommand.resetContext(SourceFile:138)
	at com.github.ajalt.clikt.core.CoreCliktCommandKt.parse(SourceFile:114)
	at io.github.composegears.valkyrie.cli.MainKt.main(SourceFile:78)

java.lang.IllegalStateException: Error occurred when running command line: Exception in thread "main" java.lang.AbstractMethodError: Receiver class kotlin.sequences.SequencesKt$$Lambda/0x000000ff01022800 does not define or inherit an implementation of the resolved method 'abstract java.lang.Object invoke$3()' of interface kotlin.jvm.functions.Function0.
	at kotlin.sequences.GeneratorSequence$iterator$1.hasNext(SourceFile:609)
	at com.github.ajalt.clikt.core.Context$Companion.build$clikt(SourceFile:559)
	at com.github.ajalt.clikt.core.CliktCommand.resetContext(SourceFile:116)
	at com.github.ajalt.clikt.core.CliktCommand.resetContext(SourceFile:138)
	at com.github.ajalt.clikt.core.CoreCliktCommandKt.parse(SourceFile:114)
	at io.github.composegears.valkyrie.cli.MainKt.main(SourceFile:78)

```

Pull request description:
- closes #566 

tests passed

<img width="1354" alt="Screenshot 2024-11-27 at 18 28 36" src="https://github.com/user-attachments/assets/c231f030-4afb-4e71-b568-b43bb8382408">



added `test.api` file due to
<img width="1187" alt="Screenshot 2024-11-27 at 18 30 29" src="https://github.com/user-attachments/assets/9bed3ce8-f2e5-479b-a5e1-bc958261d7d3">

Patch:
diff --git a/clikt-mordant-markdown/build.gradle.kts b/clikt-mordant-markdown/build.gradle.kts
index 3ee75aa2..ca37ead9 100644
--- a/clikt-mordant-markdown/build.gradle.kts
+++ b/clikt-mordant-markdown/build.gradle.kts
@@ -1,6 +1,5 @@
 import org.jetbrains.dokka.gradle.DokkaTaskPartial
-import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
-
+import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
 
 plugins {
     kotlin("multiplatform")
diff --git a/clikt-mordant/build.gradle.kts b/clikt-mordant/build.gradle.kts
index 8a5cd3eb..f819fb96 100644
--- a/clikt-mordant/build.gradle.kts
+++ b/clikt-mordant/build.gradle.kts
@@ -1,6 +1,5 @@
 import org.jetbrains.dokka.gradle.DokkaTaskPartial
-import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
-
+import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
 
 plugins {
     kotlin("multiplatform")
diff --git a/clikt/build.gradle.kts b/clikt/build.gradle.kts
index b7cc3c93..16814d50 100644
--- a/clikt/build.gradle.kts
+++ b/clikt/build.gradle.kts
@@ -1,9 +1,8 @@
 import org.jetbrains.dokka.gradle.DokkaTaskPartial
-import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
+import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
 import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
 import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
 
-
 plugins {
     kotlin("multiplatform")
     alias(libs.plugins.publish)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 8f30e169..08914bdb 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
 [versions]
-kotlin = "2.0.0"
+kotlin = "2.1.0"
 coroutines = "1.8.1"
 mordant = "3.0.0"
 
@@ -21,4 +21,4 @@ kotlinx-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2"
 [plugins]
 dokka = "org.jetbrains.dokka:1.9.20"
 publish = "com.vanniktech.maven.publish:0.28.0"
-kotlinBinaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator:0.14.0"
+kotlinBinaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator:0.16.3"


Test patch:
diff --git a/test/api/test.api b/test/api/test.api
new file mode 100644
index 00000000..e69de29b
diff --git a/test/build.gradle.kts b/test/build.gradle.kts
index 7d638b24..284252c6 100644
--- a/test/build.gradle.kts
+++ b/test/build.gradle.kts
@@ -1,6 +1,4 @@
-import org.jetbrains.dokka.gradle.DokkaTaskPartial
-import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
-
+import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
 
 plugins {
     kotlin("multiplatform")