Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.github.ajalt.clikt:clikt to v5 #8538

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15to18", version.re
bouncycastle-bctls = { module = "org.bouncycastle:bctls-jdk15to18", version.ref = "org-bouncycastle" }
brotli-dec = "org.brotli:dec:0.1.2"
checkStyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkStyle" }
clikt = "com.github.ajalt.clikt:clikt:4.4.0"
clikt = "com.github.ajalt.clikt:clikt:5.0.0"
codehaus-signature-java18 = "org.codehaus.mojo.signature:java18:1.0"
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "org-conscrypt" }
conscrypt-openjdk = { module = "org.conscrypt:conscrypt-openjdk-uber", version.ref = "org-conscrypt" }
Expand Down
6 changes: 5 additions & 1 deletion okcurl/src/main/kotlin/okhttp3/curl/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package okhttp3.curl

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.Context
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.flag
Expand All @@ -39,7 +40,10 @@ import okhttp3.internal.platform.Platform
import okhttp3.logging.HttpLoggingInterceptor
import okhttp3.logging.LoggingEventListener

class Main : CliktCommand(name = NAME, help = "A curl for the next-generation web.") {
class Main : CliktCommand(NAME) {
override fun help(context: Context) =
"A curl for the next-generation web."

val method: String? by option("-X", "--request", help = "Specify request command to use")

val data: String? by option("-d", "--data", help = "HTTP POST data")
Expand Down
1 change: 1 addition & 0 deletions okcurl/src/main/kotlin/okhttp3/curl/MainCommandLine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package okhttp3.curl

import com.github.ajalt.clikt.core.main
import kotlin.system.exitProcess

fun main(args: Array<String>) {
Expand Down
Loading