mirror of
https://github.com/apple/pkl.git
synced 2026-05-07 07:33:36 +02:00
Bump clikt to 5.0.3 (#947)
This bumps Clikt from version 3 to version 5, which, among other things, improves the help text formatting with colors. Also: * Add `--version` flag to pkldoc, pkl-codegen-java, pkl-codegen-kotlin * Add help text to pkldoc, pkl-codegen-java, pkl-codegen-kotlin
This commit is contained in:
@@ -24,7 +24,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -42,6 +42,15 @@ configurations {
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency {
|
||||
if (requested.group == "org.jetbrains.kotlin") {
|
||||
// prevent transitive deps from bumping Koltin version
|
||||
useVersion(libs.versions.kotlin.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withType(JavaPlugin::class).configureEach {
|
||||
val java = project.extensions.getByType<JavaPluginExtension>()
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
@@ -48,6 +48,9 @@ val relocations =
|
||||
// pkl-cli dependencies
|
||||
"org.jline." to "org.pkl.thirdparty.jline.",
|
||||
"com.github.ajalt.clikt." to "org.pkl.thirdparty.clikt.",
|
||||
"com.github.ajalt.colormath" to "org.pkl.thirdparty.colormath.",
|
||||
"com.github.ajalt.mordant" to "org.pkl.thirdparty.mordant",
|
||||
"com.sun.jna" to "org.pkl.thirdparty.jna",
|
||||
"kotlin." to "org.pkl.thirdparty.kotlin.",
|
||||
"kotlinx." to "org.pkl.thirdparty.kotlinx.",
|
||||
"org.intellij." to "org.pkl.thirdparty.intellij.",
|
||||
|
||||
@@ -22,8 +22,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[versions] # ordered alphabetically
|
||||
antlr = "4.+"
|
||||
assertj = "3.+"
|
||||
assertj = "3.+"
|
||||
checksumPlugin = "1.4.0"
|
||||
clikt = "3.+"
|
||||
clikt = "5.+"
|
||||
commonMark = "0.+"
|
||||
downloadTaskPlugin = "5.6.0"
|
||||
geantyref = "1.+"
|
||||
@@ -53,6 +53,7 @@ antlr = { group = "com.tunnelvisionlabs", name = "antlr4", version.ref = "antlr"
|
||||
antlrRuntime = { group = "com.tunnelvisionlabs", name = "antlr4-runtime", version.ref = "antlr" }
|
||||
assertj = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" }
|
||||
clikt = { group = "com.github.ajalt.clikt", name = "clikt", version.ref = "clikt" }
|
||||
cliktMarkdown = { group = "com.github.ajalt.clikt", name = "clikt-markdown", version.ref = "clikt" }
|
||||
commonMark = { group = "org.commonmark", name = "commonmark", version.ref = "commonMark" }
|
||||
commonMarkTables = { group = "org.commonmark", name = "commonmark-ext-gfm-tables", version.ref = "commonMark" }
|
||||
downloadTaskPlugin = { group = "de.undercouch", name = "gradle-download-task", version.ref = "downloadTaskPlugin" }
|
||||
|
||||
@@ -8,8 +8,26 @@ com.fasterxml.jackson.core:jackson-databind:2.18.2=testCompileClasspath,testImpl
|
||||
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.fasterxml.jackson:jackson-bom:2.18.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.jknack:handlebars-helpers:4.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.jknack:handlebars:4.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.36.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
@@ -22,6 +40,7 @@ com.networknt:json-schema-validator:1.5.5=testCompileClasspath,testImplementatio
|
||||
commons-fileupload:commons-fileupload:1.5=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
commons-io:commons-io:2.11.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
net.javacrumbs.json-unit:json-unit-core:2.40.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.minidev:accessors-smart:2.5.1=testRuntimeClasspath
|
||||
net.minidev:json-smart:2.5.1=testRuntimeClasspath
|
||||
@@ -80,18 +99,19 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jline:jline-native:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jline:jline-reader:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jline:jline-terminal-jansi:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
|
||||
@@ -68,11 +68,7 @@ dependencies {
|
||||
implementation(libs.jlineTerminal)
|
||||
implementation(libs.jlineTerminalJansi)
|
||||
implementation(projects.pklServer)
|
||||
implementation(libs.clikt) {
|
||||
// force clikt to use our version of the kotlin stdlib
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common")
|
||||
}
|
||||
implementation(libs.clikt)
|
||||
|
||||
testImplementation(projects.pklCommonsTest)
|
||||
testImplementation(libs.wiremock)
|
||||
|
||||
@@ -51,9 +51,9 @@ constructor(
|
||||
// keep in sync with error message thrown by clikt
|
||||
throw CliException(
|
||||
"""
|
||||
Usage: pkl test [OPTIONS] <modules>...
|
||||
Usage: pkl test [<options>] <modules>...
|
||||
|
||||
Error: Missing argument "<modules>"
|
||||
Error: missing argument <modules>
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.pkl.cli
|
||||
|
||||
import com.github.ajalt.clikt.core.main
|
||||
import org.pkl.cli.commands.*
|
||||
import org.pkl.commons.cli.cliMain
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.pkl.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
import com.github.ajalt.clikt.core.NoOpCliktCommand
|
||||
import com.github.ajalt.clikt.core.subcommands
|
||||
import com.github.ajalt.clikt.parameters.options.option
|
||||
@@ -25,28 +26,23 @@ import org.pkl.cli.CliImportAnalyzerOptions
|
||||
import org.pkl.commons.cli.commands.ModulesCommand
|
||||
import org.pkl.commons.cli.commands.single
|
||||
|
||||
class AnalyzeCommand :
|
||||
NoOpCliktCommand(
|
||||
name = "analyze",
|
||||
help = "Commands related to static analysis",
|
||||
epilog = "For more information, visit $helpLink",
|
||||
) {
|
||||
class AnalyzeCommand : NoOpCliktCommand(name = "analyze") {
|
||||
override fun help(context: Context) = "Commands related to static analysis"
|
||||
|
||||
override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
||||
|
||||
init {
|
||||
subcommands(AnalyzeImportsCommand())
|
||||
}
|
||||
}
|
||||
|
||||
class AnalyzeImportsCommand :
|
||||
ModulesCommand(
|
||||
name = "imports",
|
||||
helpLink = helpLink,
|
||||
help = "Prints the graph of modules imported by the input module(s).",
|
||||
) {
|
||||
class AnalyzeImportsCommand : ModulesCommand(name = "imports", helpLink = helpLink) {
|
||||
override val helpString = "Prints the graph of modules imported by the input module(s)."
|
||||
|
||||
private val outputPath: Path? by
|
||||
option(
|
||||
names = arrayOf("-o", "--output-path"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "File path where the output file is placed.",
|
||||
)
|
||||
.path()
|
||||
|
||||
@@ -27,29 +27,27 @@ import org.pkl.commons.cli.commands.ProjectOptions
|
||||
import org.pkl.commons.cli.commands.single
|
||||
import org.pkl.core.packages.PackageUri
|
||||
|
||||
class DownloadPackageCommand :
|
||||
BaseCommand(
|
||||
name = "download-package",
|
||||
helpLink = helpLink,
|
||||
help =
|
||||
"""
|
||||
Download package(s)
|
||||
|
||||
This command downloads the specified packages to the cache directory.
|
||||
If the package already exists in the cache directory, this command is a no-op.
|
||||
|
||||
Examples:
|
||||
```
|
||||
# Download two packages
|
||||
$ pkl download-package package://example.com/package1@1.0.0 package://example.com/package2@1.0.0
|
||||
```
|
||||
class DownloadPackageCommand : BaseCommand(name = "download-package", helpLink = helpLink) {
|
||||
override val helpString =
|
||||
"""
|
||||
Download package(s)
|
||||
|
||||
This command downloads the specified packages to the cache directory.
|
||||
If the package already exists in the cache directory, this command is a no-op.
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
# Download two packages
|
||||
$ pkl download-package package://example.com/package1@1.0.0 package://example.com/package2@1.0.0
|
||||
```
|
||||
"""
|
||||
.trimIndent(),
|
||||
) {
|
||||
.trimIndent()
|
||||
|
||||
private val projectOptions by ProjectOptions()
|
||||
|
||||
private val packageUris: List<PackageUri> by
|
||||
argument("<package>", "The package URIs to download")
|
||||
argument("package", "The package URIs to download")
|
||||
.convert { PackageUri(it) }
|
||||
.multiple(required = true)
|
||||
|
||||
|
||||
@@ -24,12 +24,14 @@ import org.pkl.cli.CliEvaluatorOptions
|
||||
import org.pkl.commons.cli.commands.ModulesCommand
|
||||
import org.pkl.commons.cli.commands.single
|
||||
|
||||
class EvalCommand :
|
||||
ModulesCommand(name = "eval", help = "Render pkl module(s)", helpLink = helpLink) {
|
||||
class EvalCommand : ModulesCommand(name = "eval", helpLink = helpLink) {
|
||||
|
||||
override val helpString = "Render pkl module(s)"
|
||||
|
||||
private val outputPath: String? by
|
||||
option(
|
||||
names = arrayOf("-o", "--output-path"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "File path where the output file is placed.",
|
||||
)
|
||||
.single()
|
||||
@@ -37,7 +39,7 @@ class EvalCommand :
|
||||
private val moduleOutputSeparator: String by
|
||||
option(
|
||||
names = arrayOf("--module-output-separator"),
|
||||
metavar = "<string>",
|
||||
metavar = "string",
|
||||
help =
|
||||
"Separator to use when multiple module outputs are written to the same file. (default: ---)",
|
||||
)
|
||||
@@ -47,7 +49,7 @@ class EvalCommand :
|
||||
private val expression: String? by
|
||||
option(
|
||||
names = arrayOf("-x", "--expression"),
|
||||
metavar = "<expression>",
|
||||
metavar = "expression",
|
||||
help = "Expression to be evaluated within the module.",
|
||||
)
|
||||
.single()
|
||||
@@ -55,7 +57,7 @@ class EvalCommand :
|
||||
private val multipleFileOutputPath: String? by
|
||||
option(
|
||||
names = arrayOf("-m", "--multiple-file-output-path"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "Directory where a module's multiple file output is placed.",
|
||||
)
|
||||
.single()
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.pkl.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
import com.github.ajalt.clikt.core.NoOpCliktCommand
|
||||
import com.github.ajalt.clikt.core.subcommands
|
||||
import com.github.ajalt.clikt.parameters.arguments.argument
|
||||
@@ -33,95 +34,88 @@ import org.pkl.commons.cli.commands.single
|
||||
|
||||
private const val NEWLINE = '\u0085'
|
||||
|
||||
class ProjectCommand :
|
||||
NoOpCliktCommand(
|
||||
name = "project",
|
||||
help = "Run commands related to projects",
|
||||
epilog = "For more information, visit $helpLink",
|
||||
) {
|
||||
class ProjectCommand : NoOpCliktCommand(name = "project") {
|
||||
override fun help(context: Context) = "Run commands related to projects"
|
||||
|
||||
override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
||||
|
||||
init {
|
||||
subcommands(ResolveCommand(), PackageCommand())
|
||||
}
|
||||
}
|
||||
|
||||
class ResolveCommand :
|
||||
BaseCommand(
|
||||
name = "resolve",
|
||||
helpLink = helpLink,
|
||||
help =
|
||||
"""
|
||||
Resolve dependencies for project(s)
|
||||
|
||||
This command takes the `dependencies` of `PklProject`s, and writes the
|
||||
resolved versions to `PklProject.deps.json` files.
|
||||
|
||||
Examples:
|
||||
class ResolveCommand : BaseCommand(name = "resolve", helpLink = helpLink) {
|
||||
override val helpString =
|
||||
"""
|
||||
Resolve dependencies for project(s)
|
||||
|
||||
```
|
||||
# Search the current working directory for a project, and resolve its dependencies.
|
||||
$ pkl project resolve
|
||||
This command takes the `dependencies` of `PklProject`s, and writes the
|
||||
resolved versions to `PklProject.deps.json` files.
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
# Search the current working directory for a project, and resolve its dependencies.
|
||||
$ pkl project resolve
|
||||
|
||||
# Resolve dependencies for all projects within the `packages/` directory.
|
||||
$ pkl project resolve packages/*/
|
||||
```
|
||||
"""
|
||||
|
||||
# Resolve dependencies for all projects within the `packages/` directory.
|
||||
$ pkl project resolve packages/*/
|
||||
```
|
||||
""",
|
||||
) {
|
||||
private val projectDirs: List<Path> by
|
||||
argument("<dir>", "The project directories to resolve dependencies for").path().multiple()
|
||||
argument("dir", "The project directories to resolve dependencies for").path().multiple()
|
||||
|
||||
override fun run() {
|
||||
CliProjectResolver(baseOptions.baseOptions(emptyList()), projectDirs).run()
|
||||
}
|
||||
}
|
||||
|
||||
class PackageCommand :
|
||||
BaseCommand(
|
||||
name = "package",
|
||||
helpLink = helpLink,
|
||||
help =
|
||||
"""
|
||||
Verify package(s), and prepare package artifacts to be published.
|
||||
class PackageCommand : BaseCommand(name = "package", helpLink = helpLink) {
|
||||
override val helpString =
|
||||
"""
|
||||
Verify package(s), and prepare package artifacts to be published.
|
||||
|
||||
This command runs a project's api tests, as defined by `apiTests` in `PklProject`.
|
||||
Additionally, it verifies that all imports resolve to paths that are local to the project.
|
||||
This command runs a project's api tests, as defined by `apiTests` in `PklProject`.
|
||||
Additionally, it verifies that all imports resolve to paths that are local to the project.
|
||||
|
||||
Finally, this command writes the following artifacts into the output directory specified by the output path.
|
||||
Finally, this command writes the following artifacts into the output directory specified by the output path.
|
||||
|
||||
- `name@version` - dependency metadata$NEWLINE
|
||||
- `name@version.sha256` - dependency metadata's SHA-256 checksum$NEWLINE
|
||||
- `name@version.zip` - package archive$NEWLINE
|
||||
- `name@version.zip.sha256` - package archive's SHA-256 checksum
|
||||
- `name@version` - dependency metadata$NEWLINE
|
||||
- `name@version.sha256` - dependency metadata's SHA-256 checksum$NEWLINE
|
||||
- `name@version.zip` - package archive$NEWLINE
|
||||
- `name@version.zip.sha256` - package archive's SHA-256 checksum
|
||||
|
||||
The output path option accepts the following placeholders:
|
||||
The output path option accepts the following placeholders:
|
||||
|
||||
- %{name}: The display name of the package$NEWLINE
|
||||
- %{version}: The version of the package
|
||||
- %{name}: The display name of the package$NEWLINE
|
||||
- %{version}: The version of the package
|
||||
|
||||
If a project has local project dependencies, the depended upon project directories must also
|
||||
be included as arguments to this command.
|
||||
If a project has local project dependencies, the depended upon project directories must also
|
||||
be included as arguments to this command.
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
```
|
||||
# Search the current working directory for a project, and package it.
|
||||
$ pkl project package
|
||||
```
|
||||
# Search the current working directory for a project, and package it.
|
||||
$ pkl project package
|
||||
|
||||
# Package all projects within the `packages/` directory.
|
||||
$ pkl project package packages/*/
|
||||
```
|
||||
"""
|
||||
.trimIndent()
|
||||
|
||||
# Package all projects within the `packages/` directory.
|
||||
$ pkl project package packages/*/
|
||||
```
|
||||
"""
|
||||
.trimIndent(),
|
||||
) {
|
||||
private val testOptions by TestOptions()
|
||||
|
||||
private val projectDirs: List<Path> by
|
||||
argument("<dir>", "The project directories to package").path().multiple()
|
||||
argument("dir", "The project directories to package").path().multiple()
|
||||
|
||||
private val outputPath: String by
|
||||
option(
|
||||
names = arrayOf("--output-path"),
|
||||
help = "The directory to write artifacts to",
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
)
|
||||
.single()
|
||||
.default(".out/%{name}@%{version}")
|
||||
|
||||
@@ -21,7 +21,9 @@ import org.pkl.cli.CliRepl
|
||||
import org.pkl.commons.cli.commands.BaseCommand
|
||||
import org.pkl.commons.cli.commands.ProjectOptions
|
||||
|
||||
class ReplCommand : BaseCommand(name = "repl", help = "Start a REPL session", helpLink = helpLink) {
|
||||
class ReplCommand : BaseCommand(name = "repl", helpLink = helpLink) {
|
||||
override val helpString = "Start a REPL session"
|
||||
|
||||
private val projectOptions by ProjectOptions()
|
||||
|
||||
override fun run() {
|
||||
|
||||
@@ -15,31 +15,31 @@
|
||||
*/
|
||||
package org.pkl.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
import com.github.ajalt.clikt.core.NoOpCliktCommand
|
||||
import com.github.ajalt.clikt.core.context
|
||||
import com.github.ajalt.clikt.core.subcommands
|
||||
import com.github.ajalt.clikt.parameters.options.versionOption
|
||||
import org.pkl.commons.cli.commands.installCommonOptions
|
||||
import org.pkl.core.Release
|
||||
|
||||
internal val helpLink = "${Release.current().documentation.homepage}pkl-cli/index.html#usage"
|
||||
|
||||
class RootCommand :
|
||||
NoOpCliktCommand(
|
||||
name = "pkl",
|
||||
printHelpOnEmptyArgs = true,
|
||||
epilog = "For more information, visit $helpLink",
|
||||
) {
|
||||
init {
|
||||
versionOption(Release.current().versionInfo, names = setOf("-v", "--version"), message = { it })
|
||||
class RootCommand : NoOpCliktCommand(name = "pkl") {
|
||||
override val printHelpOnEmptyArgs = true
|
||||
|
||||
override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
||||
|
||||
init {
|
||||
context {
|
||||
correctionSuggestor = { given, possible ->
|
||||
suggestTypoCorrection = { given, possible ->
|
||||
if (!given.startsWith("-")) {
|
||||
registeredSubcommands().map { it.commandName }
|
||||
} else possible
|
||||
}
|
||||
}
|
||||
|
||||
installCommonOptions()
|
||||
|
||||
subcommands(
|
||||
EvalCommand(),
|
||||
ReplCommand(),
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
package org.pkl.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.CliktCommand
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
import org.pkl.cli.CliServer
|
||||
import org.pkl.commons.cli.CliBaseOptions
|
||||
|
||||
class ServerCommand :
|
||||
CliktCommand(
|
||||
name = "server",
|
||||
help = "Run as a server that communicates over standard input/output",
|
||||
epilog = "For more information, visit $helpLink",
|
||||
) {
|
||||
class ServerCommand : CliktCommand(name = "server") {
|
||||
override fun help(context: Context) =
|
||||
"Run as a server that communicates over standard input/output"
|
||||
|
||||
override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
||||
|
||||
override fun run() {
|
||||
CliServer(CliBaseOptions()).run()
|
||||
|
||||
@@ -26,10 +26,11 @@ import org.pkl.commons.cli.commands.BaseOptions
|
||||
import org.pkl.commons.cli.commands.ProjectOptions
|
||||
import org.pkl.commons.cli.commands.TestOptions
|
||||
|
||||
class TestCommand :
|
||||
BaseCommand(name = "test", help = "Run tests within the given module(s)", helpLink = helpLink) {
|
||||
class TestCommand : BaseCommand(name = "test", helpLink = helpLink) {
|
||||
override val helpString = "Run tests within the given module(s)"
|
||||
|
||||
val modules: List<URI> by
|
||||
argument(name = "<modules>", help = "Module paths or URIs to evaluate.")
|
||||
argument(name = "modules", help = "Module paths or URIs to evaluate.")
|
||||
.convert { BaseOptions.parseModuleName(it) }
|
||||
.multiple()
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
package org.pkl.cli
|
||||
|
||||
import com.github.ajalt.clikt.core.BadParameterValue
|
||||
import com.github.ajalt.clikt.core.CliktError
|
||||
import com.github.ajalt.clikt.core.parse
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.createDirectory
|
||||
import kotlin.io.path.createSymbolicLinkPointingTo
|
||||
@@ -43,17 +45,20 @@ class CliMainTest {
|
||||
arrayOf("eval", "--output-path", "path1", "--output-path", "path2", inputFile)
|
||||
)
|
||||
}
|
||||
.hasMessage("Invalid value for \"--output-path\": Option cannot be repeated")
|
||||
.hasMessage("Option cannot be repeated")
|
||||
|
||||
assertThatCode {
|
||||
rootCmd.parse(arrayOf("eval", "-o", "path1", "--output-path", "path2", inputFile))
|
||||
}
|
||||
.hasMessage("Invalid value for \"--output-path\": Option cannot be repeated")
|
||||
.hasMessage("Option cannot be repeated")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `eval requires at least one file`() {
|
||||
assertThatCode { rootCmd.parse(arrayOf("eval")) }.hasMessage("""Missing argument "<modules>"""")
|
||||
assertThatCode { rootCmd.parse(arrayOf("eval")) }
|
||||
.isInstanceOf(CliktError::class.java)
|
||||
.extracting("paramName")
|
||||
.isEqualTo("modules")
|
||||
}
|
||||
|
||||
// Can't reliably create symlinks on Windows.
|
||||
@@ -82,8 +87,7 @@ class CliMainTest {
|
||||
fun `cannot have multiple output with -o or -x`(@TempDir tempDir: Path) {
|
||||
val testIn = makeInput(tempDir)
|
||||
val testOut = tempDir.resolve("test").toString()
|
||||
val error =
|
||||
"""Invalid value for "--multiple-file-output-path": Option is mutually exclusive with -o, --output-path and -x, --expression."""
|
||||
val error = """Option is mutually exclusive with -o, --output-path and -x, --expression."""
|
||||
|
||||
assertThatCode { rootCmd.parse(arrayOf("eval", "-m", testOut, "-x", "x", testIn)) }
|
||||
.hasMessage(error)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.pkl.cli
|
||||
|
||||
import com.github.ajalt.clikt.core.MissingArgument
|
||||
import com.github.ajalt.clikt.testing.test
|
||||
import java.io.StringWriter
|
||||
import java.io.Writer
|
||||
import java.net.URI
|
||||
@@ -388,9 +388,9 @@ class CliTestRunnerTest {
|
||||
@Test
|
||||
fun `no source modules specified has same message as pkl eval`() {
|
||||
val e1 = assertThrows<CliException> { CliTestRunner(CliBaseOptions(), CliTestOptions()).run() }
|
||||
val e2 = assertThrows<MissingArgument> { RootCommand().parse(listOf("eval")) }
|
||||
assertThat(e1).hasMessageContaining("Missing argument \"<modules>\"")
|
||||
assertThat(e1.message!!.replace("test", "eval")).isEqualTo(e2.helpMessage())
|
||||
val e2 = RootCommand().test("eval")
|
||||
assertThat(e1).hasMessageContaining("missing argument <modules>")
|
||||
assertThat(e1.message!!.replace("test", "eval") + "\n").isEqualTo(e2.stderr)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.palantir.javapoet:javapoet:0.6.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
@@ -24,18 +43,19 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -17,12 +17,14 @@
|
||||
|
||||
package org.pkl.codegen.java
|
||||
|
||||
import com.github.ajalt.clikt.core.main
|
||||
import com.github.ajalt.clikt.parameters.options.*
|
||||
import com.github.ajalt.clikt.parameters.types.path
|
||||
import java.nio.file.Path
|
||||
import org.pkl.commons.cli.CliBaseOptions
|
||||
import org.pkl.commons.cli.cliMain
|
||||
import org.pkl.commons.cli.commands.ModulesCommand
|
||||
import org.pkl.commons.cli.commands.installCommonOptions
|
||||
import org.pkl.commons.toPath
|
||||
import org.pkl.core.Release
|
||||
|
||||
@@ -31,18 +33,15 @@ internal fun main(args: Array<String>) {
|
||||
cliMain { PklJavaCodegenCommand().main(args) }
|
||||
}
|
||||
|
||||
class PklJavaCodegenCommand :
|
||||
ModulesCommand(
|
||||
name = "pkl-codegen-java",
|
||||
helpLink = Release.current().documentation().homepage(),
|
||||
) {
|
||||
internal val helpLink = "${Release.current().documentation.homepage}java-binding/codegen.html#cli"
|
||||
|
||||
class PklJavaCodegenCommand : ModulesCommand(name = "pkl-codegen-java", helpLink) {
|
||||
private val defaults = CliJavaCodeGeneratorOptions(CliBaseOptions(), "".toPath())
|
||||
|
||||
private val outputDir: Path by
|
||||
option(
|
||||
names = arrayOf("-o", "--output-dir"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "The directory where generated source code is placed.",
|
||||
)
|
||||
.path()
|
||||
@@ -51,7 +50,7 @@ class PklJavaCodegenCommand :
|
||||
private val indent: String by
|
||||
option(
|
||||
names = arrayOf("--indent"),
|
||||
metavar = "<chars>",
|
||||
metavar = "chars",
|
||||
help = "The characters to use for indenting generated source code.",
|
||||
)
|
||||
.default(defaults.indent)
|
||||
@@ -113,7 +112,7 @@ class PklJavaCodegenCommand :
|
||||
private val renames: Map<String, String> by
|
||||
option(
|
||||
names = arrayOf("--rename"),
|
||||
metavar = "<old_name=new_name>",
|
||||
metavar = "old_name=new_name",
|
||||
help =
|
||||
"""
|
||||
Replace a prefix in the names of the generated Java classes (repeatable).
|
||||
@@ -125,6 +124,8 @@ class PklJavaCodegenCommand :
|
||||
)
|
||||
.associate()
|
||||
|
||||
override val helpString: String = "Generate Java classes and interfaces from Pkl module(s)"
|
||||
|
||||
override fun run() {
|
||||
val options =
|
||||
CliJavaCodeGeneratorOptions(
|
||||
@@ -141,4 +142,8 @@ class PklJavaCodegenCommand :
|
||||
)
|
||||
CliJavaCodeGenerator(options).run()
|
||||
}
|
||||
|
||||
init {
|
||||
installCommonOptions()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.squareup:kotlinpoet:1.6.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
@@ -25,8 +44,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:1.7.10=testRuntimeOnlyDependenciesMetadata
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-util:1.7.10=testRuntimeOnlyDependenciesMetadata
|
||||
@@ -40,7 +58,6 @@ org.jetbrains.kotlin:kotlin-scripting-jvm-host:2.0.21=testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=testRuntimeOnlyDependenciesMetadata
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=testRuntimeOnlyDependenciesMetadata
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=testRuntimeOnlyDependenciesMetadata
|
||||
@@ -48,6 +65,8 @@ org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspa
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=testRuntimeOnlyDependenciesMetadata
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testRuntimeClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.pkl.codegen.kotlin
|
||||
|
||||
import com.github.ajalt.clikt.core.main
|
||||
import com.github.ajalt.clikt.parameters.options.associate
|
||||
import com.github.ajalt.clikt.parameters.options.default
|
||||
import com.github.ajalt.clikt.parameters.options.flag
|
||||
@@ -26,6 +27,7 @@ import java.nio.file.Path
|
||||
import org.pkl.commons.cli.CliBaseOptions
|
||||
import org.pkl.commons.cli.cliMain
|
||||
import org.pkl.commons.cli.commands.ModulesCommand
|
||||
import org.pkl.commons.cli.commands.installCommonOptions
|
||||
import org.pkl.commons.toPath
|
||||
import org.pkl.core.Release
|
||||
|
||||
@@ -34,18 +36,15 @@ internal fun main(args: Array<String>) {
|
||||
cliMain { PklKotlinCodegenCommand().main(args) }
|
||||
}
|
||||
|
||||
class PklKotlinCodegenCommand :
|
||||
ModulesCommand(
|
||||
name = "pkl-codegen-kotlin",
|
||||
helpLink = Release.current().documentation().homepage(),
|
||||
) {
|
||||
val helpLink = "${Release.current().documentation.homepage}kotlin-binding/codegen.html#cli"
|
||||
|
||||
class PklKotlinCodegenCommand : ModulesCommand(name = "pkl-codegen-kotlin", helpLink = helpLink) {
|
||||
private val defaults = CliKotlinCodeGeneratorOptions(CliBaseOptions(), "".toPath())
|
||||
|
||||
private val outputDir: Path by
|
||||
option(
|
||||
names = arrayOf("-o", "--output-dir"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "The directory where generated source code is placed.",
|
||||
)
|
||||
.path()
|
||||
@@ -54,7 +53,7 @@ class PklKotlinCodegenCommand :
|
||||
private val indent: String by
|
||||
option(
|
||||
names = arrayOf("--indent"),
|
||||
metavar = "<chars>",
|
||||
metavar = "chars",
|
||||
help = "The characters to use for indenting generated source code.",
|
||||
)
|
||||
.default(defaults.indent)
|
||||
@@ -83,7 +82,7 @@ class PklKotlinCodegenCommand :
|
||||
private val renames: Map<String, String> by
|
||||
option(
|
||||
names = arrayOf("--rename"),
|
||||
metavar = "<old_name=new_name>",
|
||||
metavar = "old_name=new_name",
|
||||
help =
|
||||
"""
|
||||
Replace a prefix in the names of the generated Kotlin classes (repeatable).
|
||||
@@ -95,6 +94,8 @@ class PklKotlinCodegenCommand :
|
||||
)
|
||||
.associate()
|
||||
|
||||
override val helpString: String = "Generate Kotlin classes and interfaces from Pkl module(s)"
|
||||
|
||||
override fun run() {
|
||||
val options =
|
||||
CliKotlinCodeGeneratorOptions(
|
||||
@@ -108,4 +109,8 @@ class PklKotlinCodegenCommand :
|
||||
)
|
||||
CliKotlinCodeGenerator(options).run()
|
||||
}
|
||||
|
||||
init {
|
||||
installCommonOptions()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,28 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
@@ -22,18 +41,19 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=implementationDependenciesMetadata,runtimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -21,11 +21,8 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
api(projects.pklCore)
|
||||
api(libs.clikt) {
|
||||
// force clikt to use our version of the kotlin stdlib
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect")
|
||||
}
|
||||
api(libs.clikt)
|
||||
implementation(libs.cliktMarkdown)
|
||||
|
||||
implementation(projects.pklCommons)
|
||||
testImplementation(projects.pklCommonsTest)
|
||||
|
||||
@@ -16,9 +16,15 @@
|
||||
package org.pkl.commons.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.CliktCommand
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
import com.github.ajalt.clikt.parameters.groups.provideDelegate
|
||||
|
||||
abstract class BaseCommand(name: String, helpLink: String, help: String = "") :
|
||||
CliktCommand(name = name, help = help, epilog = "For more information, visit $helpLink") {
|
||||
abstract class BaseCommand(name: String, private val helpLink: String) : CliktCommand(name = name) {
|
||||
abstract val helpString: String
|
||||
|
||||
override fun help(context: Context) = helpString
|
||||
|
||||
final override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
||||
|
||||
val baseOptions: BaseOptions by BaseOptions()
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class BaseOptions : OptionGroup() {
|
||||
names = arrayOf("--allowed-modules"),
|
||||
help = "URI patterns that determine which modules can be loaded and evaluated.",
|
||||
)
|
||||
.convert("<pattern1,pattern2>") { Pattern.compile(it) }
|
||||
.convert("pattern1,pattern2") { Pattern.compile(it) }
|
||||
.splitAll()
|
||||
|
||||
val allowedResources: List<Pattern> by
|
||||
@@ -111,7 +111,7 @@ class BaseOptions : OptionGroup() {
|
||||
names = arrayOf("--allowed-resources"),
|
||||
help = "URI patterns that determine which external resources can be read.",
|
||||
)
|
||||
.convert("<pattern1,pattern2>") { Pattern.compile(it) }
|
||||
.convert("pattern1,pattern2") { Pattern.compile(it) }
|
||||
.splitAll()
|
||||
|
||||
val rootDir: Path? by
|
||||
@@ -140,7 +140,7 @@ class BaseOptions : OptionGroup() {
|
||||
val properties: Map<String, String> by
|
||||
option(
|
||||
names = arrayOf("-p", "--property"),
|
||||
metavar = "<name=value>",
|
||||
metavar = "name=value",
|
||||
help = "External property to set (repeatable).",
|
||||
)
|
||||
.associateProps()
|
||||
@@ -148,7 +148,7 @@ class BaseOptions : OptionGroup() {
|
||||
val color: Color by
|
||||
option(
|
||||
names = arrayOf("--color"),
|
||||
metavar = "<when>",
|
||||
metavar = "when",
|
||||
help =
|
||||
"Whether to format messages in ANSI color. Possible values of <when> are 'never', 'auto', and 'always'.",
|
||||
)
|
||||
@@ -171,7 +171,7 @@ class BaseOptions : OptionGroup() {
|
||||
val envVars: Map<String, String> by
|
||||
option(
|
||||
names = arrayOf("-e", "--env-var"),
|
||||
metavar = "<name=value>",
|
||||
metavar = "name=value",
|
||||
help = "Environment variable to set (repeatable).",
|
||||
)
|
||||
.associate()
|
||||
@@ -179,7 +179,7 @@ class BaseOptions : OptionGroup() {
|
||||
val modulePath: List<Path> by
|
||||
option(
|
||||
names = arrayOf("--module-path"),
|
||||
metavar = "<path1${File.pathSeparator}path2>",
|
||||
metavar = "path1${File.pathSeparator}path2",
|
||||
help =
|
||||
"Directories, ZIP archives, or JAR archives to search when resolving `modulepath:` URIs.",
|
||||
)
|
||||
@@ -194,7 +194,7 @@ class BaseOptions : OptionGroup() {
|
||||
val timeout: Duration? by
|
||||
option(
|
||||
names = arrayOf("-t", "--timeout"),
|
||||
metavar = "<number>",
|
||||
metavar = "number",
|
||||
help = "Duration, in seconds, after which evaluation of a source module will be timed out.",
|
||||
)
|
||||
.single()
|
||||
@@ -204,7 +204,7 @@ class BaseOptions : OptionGroup() {
|
||||
val caCertificates: List<Path> by
|
||||
option(
|
||||
names = arrayOf("--ca-certificates"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help = "Only trust CA certificates from the provided file(s).",
|
||||
)
|
||||
.path()
|
||||
@@ -213,7 +213,7 @@ class BaseOptions : OptionGroup() {
|
||||
val proxy: URI? by
|
||||
option(
|
||||
names = arrayOf("--http-proxy"),
|
||||
metavar = "<address>",
|
||||
metavar = "address",
|
||||
help = "Proxy to use for HTTP(S) connections.",
|
||||
)
|
||||
.single()
|
||||
@@ -229,7 +229,7 @@ class BaseOptions : OptionGroup() {
|
||||
val noProxy: List<String>? by
|
||||
option(
|
||||
names = arrayOf("--http-no-proxy"),
|
||||
metavar = "<pattern1,pattern2>",
|
||||
metavar = "pattern1,pattern",
|
||||
help = "Hostnames that should not be connected to via a proxy.",
|
||||
)
|
||||
.single()
|
||||
@@ -238,7 +238,7 @@ class BaseOptions : OptionGroup() {
|
||||
val externalModuleReaders: Map<String, ExternalReader> by
|
||||
option(
|
||||
names = arrayOf("--external-module-reader"),
|
||||
metavar = "<scheme>='<executable>[ <arguments>]'",
|
||||
metavar = "<scheme>='<executable> [<arguments>]'",
|
||||
help = "External reader registrations for module URI schemes",
|
||||
)
|
||||
.parseExternalReader("=")
|
||||
@@ -248,7 +248,7 @@ class BaseOptions : OptionGroup() {
|
||||
val externalResourceReaders: Map<String, ExternalReader> by
|
||||
option(
|
||||
names = arrayOf("--external-resource-reader"),
|
||||
metavar = "<scheme>='<executable>[ <arguments>]'",
|
||||
metavar = "<scheme>='<executable> [<arguments>]'",
|
||||
help = "External reader registrations for resource URI schemes",
|
||||
)
|
||||
.parseExternalReader("=")
|
||||
|
||||
@@ -21,10 +21,10 @@ import com.github.ajalt.clikt.parameters.arguments.multiple
|
||||
import com.github.ajalt.clikt.parameters.groups.provideDelegate
|
||||
import java.net.URI
|
||||
|
||||
abstract class ModulesCommand(name: String, helpLink: String, help: String = "") :
|
||||
BaseCommand(name = name, help = help, helpLink = helpLink) {
|
||||
abstract class ModulesCommand(name: String, helpLink: String) :
|
||||
BaseCommand(name = name, helpLink = helpLink) {
|
||||
open val modules: List<URI> by
|
||||
argument(name = "<modules>", help = "Module paths or URIs to evaluate.")
|
||||
argument(name = "modules", help = "Module paths or URIs to evaluate.")
|
||||
.convert { BaseOptions.parseModuleName(it) }
|
||||
.multiple(required = true)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.splitAll(
|
||||
transformEach = { it },
|
||||
transformAll = { it.flatten().ifEmpty { default } },
|
||||
validator = {},
|
||||
nvalues = 1,
|
||||
valueSplit = Regex.fromLiteral(separator),
|
||||
nvalues = 1..1,
|
||||
valueSplit = { it.split(Regex.fromLiteral(separator)) },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class ProjectOptions : OptionGroup() {
|
||||
val projectDir: Path? by
|
||||
option(
|
||||
names = arrayOf("--project-dir"),
|
||||
metavar = "<path>",
|
||||
metavar = "path",
|
||||
help =
|
||||
"The project directory to use for this command. By default, searches up from the working directory for a PklProject file.",
|
||||
)
|
||||
|
||||
@@ -26,7 +26,7 @@ class TestOptions : OptionGroup() {
|
||||
private val junitReportDir: Path? by
|
||||
option(
|
||||
names = arrayOf("--junit-reports"),
|
||||
metavar = "<dir>",
|
||||
metavar = "dir",
|
||||
help = "Directory where to store JUnit reports.",
|
||||
)
|
||||
.path()
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.pkl.commons.cli.commands
|
||||
|
||||
import com.github.ajalt.clikt.core.BaseCliktCommand
|
||||
import com.github.ajalt.clikt.core.context
|
||||
import com.github.ajalt.clikt.core.installMordantMarkdown
|
||||
import com.github.ajalt.clikt.core.terminal
|
||||
import com.github.ajalt.clikt.parameters.options.versionOption
|
||||
import com.github.ajalt.mordant.rendering.TextStyle
|
||||
import com.github.ajalt.mordant.rendering.Theme
|
||||
import com.github.ajalt.mordant.terminal.Terminal
|
||||
import org.pkl.core.Release
|
||||
|
||||
private val theme = Theme { styles["markdown.code.span"] = TextStyle(bold = true) }
|
||||
|
||||
fun <T : BaseCliktCommand<T>> T.installCommonOptions() {
|
||||
installMordantMarkdown()
|
||||
|
||||
versionOption(Release.current().versionInfo, names = setOf("-v", "--version"), message = { it })
|
||||
|
||||
context { terminal = Terminal(theme = theme) }
|
||||
}
|
||||
@@ -17,6 +17,7 @@ package org.pkl.commons.cli
|
||||
|
||||
import com.github.ajalt.clikt.core.BadParameterValue
|
||||
import com.github.ajalt.clikt.core.PrintHelpMessage
|
||||
import com.github.ajalt.clikt.core.parse
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
import java.util.regex.Pattern
|
||||
@@ -31,12 +32,14 @@ class BaseCommandTest {
|
||||
private val cmd =
|
||||
object : BaseCommand("test", "") {
|
||||
override fun run() = Unit
|
||||
|
||||
override val helpString: String = ""
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `invalid timeout`() {
|
||||
val e = assertThrows<BadParameterValue> { cmd.parse(arrayOf("--timeout", "abc")) }
|
||||
assertThat(e).hasMessageContaining("timeout")
|
||||
assertThat(e.message).isEqualTo("abc is not a valid integer")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.pkl.commons.cli
|
||||
|
||||
import com.github.ajalt.clikt.core.parse
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.pkl.commons.cli.commands.BaseCommand
|
||||
@@ -32,6 +33,8 @@ class CliCommandTest {
|
||||
private val cmd =
|
||||
object : BaseCommand("test", "") {
|
||||
override fun run() = Unit
|
||||
|
||||
override val helpString: String = ""
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -14,7 +14,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -14,7 +14,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -1,12 +1,31 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt:3.5.4=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.clikt:clikt:5.0.3=pklCodegenJava
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=pklCodegenJava
|
||||
com.github.ajalt.colormath:colormath:3.6.0=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=pklCodegenJava
|
||||
com.github.ajalt.mordant:mordant:3.0.1=pklCodegenJava
|
||||
com.palantir.javapoet:javapoet:0.6.0=pklCodegenJava
|
||||
io.leangen.geantyref:geantyref:1.3.16=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
javax.inject:javax.inject:1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=pklCodegenJava
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||
@@ -25,18 +44,19 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=pklCodegenJava
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=pklCodegenJava
|
||||
org.jetbrains:markdown:0.7.3=pklCodegenJava
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt:3.5.4=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.clikt:clikt:5.0.3=pklCodegenKotlin
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=pklCodegenKotlin
|
||||
com.github.ajalt.colormath:colormath:3.6.0=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=pklCodegenKotlin
|
||||
com.github.ajalt.mordant:mordant:3.0.1=pklCodegenKotlin
|
||||
com.squareup:kotlinpoet:1.6.0=pklCodegenKotlin
|
||||
io.leangen.geantyref:geantyref:1.3.16=pklConfigJava,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=pklCodegenKotlin
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||
@@ -24,19 +43,19 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=compileClasspath,implementationDependenciesMetadata,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=pklCodegenKotlin
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=pklCodegenKotlin
|
||||
org.jetbrains:markdown:0.7.3=pklCodegenKotlin
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -29,7 +29,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -1,8 +1,26 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.google.code.findbugs:jsr305:3.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.18.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
com.google.guava:failureaccess:1.0.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
@@ -17,6 +35,7 @@ commons-io:commons-io:2.4=validator
|
||||
commons-logging:commons-logging:1.2=validator
|
||||
isorelax:isorelax:20030108=validator
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
net.sf.saxon:Saxon-HE:9.6.0-4=validator
|
||||
nu.validator:cssvalidator:1.0.8=validator
|
||||
nu.validator:galimatias:0.1.3=validator
|
||||
@@ -61,14 +80,13 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:2.0.21=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
@@ -80,6 +98,8 @@ org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.0=compileClasspath,implemen
|
||||
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.8.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
org.junit.jupiter:junit-jupiter-api:5.8.2=testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testJdk17RuntimeClasspath
|
||||
org.junit.jupiter:junit-jupiter-engine:5.11.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.pkl.doc
|
||||
|
||||
import com.github.ajalt.clikt.core.main
|
||||
import com.github.ajalt.clikt.parameters.arguments.argument
|
||||
import com.github.ajalt.clikt.parameters.arguments.convert
|
||||
import com.github.ajalt.clikt.parameters.arguments.multiple
|
||||
@@ -31,6 +32,7 @@ import org.pkl.commons.cli.cliMain
|
||||
import org.pkl.commons.cli.commands.BaseCommand
|
||||
import org.pkl.commons.cli.commands.BaseOptions.Companion.parseModuleName
|
||||
import org.pkl.commons.cli.commands.ProjectOptions
|
||||
import org.pkl.commons.cli.commands.installCommonOptions
|
||||
import org.pkl.commons.cli.commands.single
|
||||
import org.pkl.core.Release
|
||||
|
||||
@@ -39,12 +41,12 @@ internal fun main(args: Array<String>) {
|
||||
cliMain { DocCommand().main(args) }
|
||||
}
|
||||
|
||||
class DocCommand :
|
||||
BaseCommand(name = "pkldoc", helpLink = Release.current().documentation().homepage()) {
|
||||
val helpLink = "${Release.current().documentation.homepage}pkl-doc/index.html#cli"
|
||||
|
||||
class DocCommand : BaseCommand(name = "pkldoc", helpLink = helpLink) {
|
||||
private val modules: List<URI> by
|
||||
argument(
|
||||
name = "<modules>",
|
||||
name = "modules",
|
||||
help = "Module paths/uris, or package uris to generate documentation for",
|
||||
)
|
||||
.convert { parseModuleName(it) }
|
||||
@@ -53,7 +55,7 @@ class DocCommand :
|
||||
private val outputDir: Path by
|
||||
option(
|
||||
names = arrayOf("-o", "--output-dir"),
|
||||
metavar = "<directory>",
|
||||
metavar = "directory",
|
||||
help = "Directory where generated documentation is placed.",
|
||||
)
|
||||
.path()
|
||||
@@ -69,6 +71,8 @@ class DocCommand :
|
||||
|
||||
private val projectOptions by ProjectOptions()
|
||||
|
||||
override val helpString: String = "Generate HTML documentation from Pkl modules and packages."
|
||||
|
||||
override fun run() {
|
||||
val options =
|
||||
CliDocGeneratorOptions(
|
||||
@@ -79,4 +83,8 @@ class DocCommand :
|
||||
)
|
||||
CliDocGenerator(options).run()
|
||||
}
|
||||
|
||||
init {
|
||||
installCommonOptions()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.pkl.doc
|
||||
|
||||
import com.github.ajalt.clikt.core.parse
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.assertThrows
|
||||
|
||||
@@ -20,7 +20,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=compileClasspath,compileOnlyDependenciesMetadata
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=compileClasspath,compileOnlyDependenciesMetadata
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=compileClasspath,compileOnlyDependenciesMetadata
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=compileClasspath,compileOnlyDependenciesMetadata
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testJdk17CompileClasspath,testJdk17ImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
@@ -16,13 +24,12 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=compileClasspath,compileOnlyDependenciesMetadata
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=compileClasspath,compileOnlyDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||
|
||||
@@ -20,7 +20,7 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17,kotlinKlibCommonizerClasspath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestJdk17
|
||||
|
||||
@@ -1,11 +1,30 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-core:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-jvm:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown-jvm:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt-markdown:5.0.3=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.clikt:clikt:5.0.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.colormath:colormath:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-core:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm-jna:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-jvm:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant-markdown:3.0.1=runtimeClasspath,testRuntimeClasspath
|
||||
com.github.ajalt.mordant:mordant:3.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.palantir.javapoet:javapoet:0.6.0=runtimeClasspath,testRuntimeClasspath
|
||||
com.squareup:kotlinpoet:1.6.0=runtimeClasspath,testRuntimeClasspath
|
||||
io.leangen.geantyref:geantyref:1.3.16=runtimeClasspath,testRuntimeClasspath
|
||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.commonmark:commonmark-ext-gfm-tables:0.24.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.commonmark:commonmark:0.24.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.fusesource.jansi:jansi:2.4.1=runtimeClasspath,testRuntimeClasspath
|
||||
@@ -19,7 +38,6 @@ org.graalvm.truffle:truffle-api:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
org.graalvm.truffle:truffle-compiler:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
org.graalvm.truffle:truffle-runtime:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
@@ -30,6 +48,8 @@ org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.0=runtimeClasspath,testRunt
|
||||
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.8.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:annotations:13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||
org.jline:jline-native:3.23.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.jline:jline-reader:3.23.0=runtimeClasspath,testRuntimeClasspath
|
||||
org.jline:jline-terminal-jansi:3.23.0=runtimeClasspath,testRuntimeClasspath
|
||||
|
||||
Reference in New Issue
Block a user