Skip to content

Commit feeffc0

Browse files
committed
Update dependencies
1 parent b62d41d commit feeffc0

File tree

19 files changed

+145
-143
lines changed

19 files changed

+145
-143
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ docs/index.md
1313
kotlin-js-store/
1414
.kotlin/
1515
site/
16+
.claude/
17+
CLAUDE.md

build.gradle.kts

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
2-
import org.jetbrains.dokka.gradle.DokkaTask
3-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
41
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
52
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
63

@@ -25,12 +22,20 @@ fun getPublishVersion(): String {
2522
return "$version.$buildNumber-SNAPSHOT"
2623
}
2724

25+
dokka {
26+
dokkaPublications.html {
27+
outputDirectory.set(rootProject.rootDir.resolve("docs/api"))
28+
}
29+
pluginsConfiguration.html {
30+
footerMessage.set("Copyright © 2018 AJ Alt")
31+
}
32+
}
2833

29-
private val dokkaConfig = mapOf(
30-
"org.jetbrains.dokka.base.DokkaBase" to """{
31-
"footerMessage": "Copyright © 2018 AJ Alt"
32-
}"""
33-
)
34+
dependencies {
35+
dokka(project(":clikt"))
36+
dokka(project(":clikt-mordant"))
37+
dokka(project(":clikt-mordant-markdown"))
38+
}
3439

3540
subprojects {
3641
project.setProperty("VERSION_NAME", getPublishVersion())
@@ -46,18 +51,4 @@ subprojects {
4651
pluginManager.withPlugin("com.vanniktech.maven.publish") {
4752
apply(plugin = "org.jetbrains.dokka")
4853
}
49-
tasks.withType<DokkaTask>().configureEach {
50-
dokkaSourceSets.configureEach {
51-
reportUndocumented.set(false)
52-
skipDeprecated.set(false)
53-
}
54-
}
55-
tasks.withType<DokkaTaskPartial>().configureEach {
56-
pluginsMapConfiguration.set(dokkaConfig)
57-
}
58-
}
59-
60-
tasks.named<DokkaMultiModuleTask>("dokkaHtmlMultiModule") {
61-
outputDirectory.set(rootProject.rootDir.resolve("docs/api"))
62-
pluginsMapConfiguration.set(dokkaConfig)
6354
}

clikt-mordant-markdown/build.gradle.kts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
21
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
32

43
plugins {
@@ -34,23 +33,23 @@ kotlin {
3433

3534
val commonTest by getting {
3635
dependencies {
37-
api(kotlin("test"))
38-
api(libs.kotest)
39-
api(libs.coroutines.core)
40-
api(libs.coroutines.test)
36+
implementation(kotlin("test"))
37+
implementation(libs.kotest)
38+
implementation(libs.coroutines.core)
39+
implementation(libs.coroutines.test)
4140
}
4241
}
4342

4443
val jvmTest by getting {
4544
dependencies {
46-
api(libs.systemrules)
47-
api(libs.jimfs)
45+
implementation(libs.systemrules)
46+
implementation(libs.jimfs)
4847
}
4948
}
5049
}
5150
}
5251

53-
tasks.withType<DokkaTaskPartial> {
52+
dokka {
5453
dokkaSourceSets.configureEach {
5554
includes.from("README.md")
5655
}

clikt-mordant/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
21
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
32

43
plugins {
@@ -40,7 +39,7 @@ kotlin {
4039
}
4140
}
4241

43-
tasks.withType<DokkaTaskPartial> {
42+
dokka {
4443
dokkaSourceSets.configureEach {
4544
includes.from("README.md")
4645
}

clikt/api/clikt.api

Lines changed: 74 additions & 67 deletions
Large diffs are not rendered by default.

clikt/build.gradle.kts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
21
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
3-
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
2+
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec
3+
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin
44
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
55

66
plugins {
@@ -37,18 +37,20 @@ kotlin {
3737

3838
// https://youtrack.jetbrains.com/issue/KT-63014
3939
// https://github.com/Kotlin/kotlin-wasm-examples/blob/1b007347bf9f8a1ec3d420d30de1815768d5df02/nodejs-example/build.gradle.kts#L22
40-
rootProject.the<NodeJsRootExtension>().apply {
41-
version = "22.0.0-nightly202404032241e8c5b3"
42-
downloadBaseUrl = "https://nodejs.org/download/nightly"
40+
rootProject.plugins.withType<NodeJsPlugin> {
41+
rootProject.the<NodeJsEnvSpec>().apply {
42+
version.set("22.0.0-nightly202404032241e8c5b3")
43+
downloadBaseUrl.set("https://nodejs.org/download/nightly")
44+
}
4345
}
4446

4547
rootProject.tasks.withType<KotlinNpmInstallTask>().configureEach {
4648
args.add("--ignore-engines")
4749
}
4850

49-
tasks.withType<DokkaTaskPartial> {
51+
dokka {
52+
moduleName.set("clikt-core")
5053
dokkaSourceSets.configureEach {
51-
moduleName.set("clikt-core")
5254
includes.from("README.md")
5355
}
5456
}

clikt/src/commonMain/kotlin/com/github/ajalt/clikt/core/Context.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Context private constructor(
162162
fun findRoot(): Context {
163163
var ctx = this
164164
while (ctx.parent != null) {
165-
ctx = ctx.parent!!
165+
ctx = ctx.parent
166166
}
167167
return ctx
168168
}

clikt/src/commonMain/kotlin/com/github/ajalt/clikt/core/exceptions.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import kotlin.jvm.JvmOverloads
1010
/**
1111
* An exception during command line processing that should be shown to the user.
1212
*
13-
* If calling [CliktCommand.main], these exceptions will be caught and the appropriate info will be printed.
13+
* If calling [CoreCliktCommand.main], these exceptions will be caught and the appropriate info will be printed.
1414
*/
1515
open class CliktError(
1616
message: String? = null,
1717
cause: Exception? = null,
1818
/**
1919
* The value to use as the exit code for the process.
2020
*
21-
* If you use [CliktCommand.main], it will pass this value to `exitProcess` after printing
21+
* If you use [CoreCliktCommand.main], it will pass this value to `exitProcess` after printing
2222
* [message]. Defaults to 1.
2323
*/
2424
val statusCode: Int = 1,
@@ -52,7 +52,7 @@ class PrintHelpMessage(
5252
/**
5353
* The value to use as the exit code for the process.
5454
*
55-
* If you use [CliktCommand.main], it will pass this value to `exitProcess` after printing
55+
* If you use [CoreCliktCommand.main], it will pass this value to `exitProcess` after printing
5656
* [message]. Defaults to 0.
5757
*/
5858
statusCode: Int = 0,
@@ -69,7 +69,7 @@ open class PrintMessage(
6969
/**
7070
* The value to use as the exit code for the process.
7171
*
72-
* If you use [CliktCommand.main], it will pass this value to `exitProcess` after printing
72+
* If you use [CoreCliktCommand.main], it will pass this value to `exitProcess` after printing
7373
* [message]. Defaults to 0.
7474
*/
7575
statusCode: Int = 0,
@@ -110,7 +110,7 @@ open class UsageError(
110110
/**
111111
* The value to use as the exit code for the process.
112112
*
113-
* If you use [CliktCommand.main], it will pass this value to `exitProcess` after printing
113+
* If you use [CoreCliktCommand.main], it will pass this value to `exitProcess` after printing
114114
* [message]. Defaults to 1.
115115
*/
116116
statusCode: Int = 1,

clikt/src/commonMain/kotlin/com/github/ajalt/clikt/parameters/options/FlagOption.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fun RawOption.flag(
3737
* A [flag] that doesn't have a default value.
3838
*
3939
* You will usually want [flag] instead of this function, but this can be useful if you need to use
40-
* a [transformAll] method like [required] or [prompt].
40+
* a [transformAll] method like [required] or `prompt`.
4141
*/
4242
fun RawOption.nullableFlag(vararg secondaryNames: String): NullableOption<Boolean, Boolean> {
4343
return boolean()

docs/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,5 +531,5 @@ applies a series of transformations to it, printing the final result:
531531
[issueMessage]: api/clikt/com.github.ajalt.clikt.core/-base-clikt-command/issue-message.html
532532
[printing-to-stdout-and-stderr]: quickstart.md#printing-to-stdout-and-stderr
533533
[requireObject]: api/clikt/com.github.ajalt.clikt.core/require-object.html
534-
[run]: api/clikt/com.github.ajalt.clikt.core/-runnable-clikt-command/run.html
534+
[run]: api/clikt/com.github.ajalt.clikt.core/-core-clikt-command/run.html
535535
[subcommands]: api/clikt/com.github.ajalt.clikt.core/subcommands.html

0 commit comments

Comments
 (0)