-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Create a Kotlin CLI to improve overall developer workflow #464
Comments
Some note on the Slack thread on what the executable could do
|
Some note on how to build the CLI tool I have some experience with it due to https://github.com/jmfayard/kotlin-cli-starter And my suggestion will sounds surprising but I would recommend to implement the script with Kotlin/JS Why? Because distribution on native and on the JVM sucks. |
I haven't thought about this in a more profound way, but integration with Gradle should be great. I don't know the current implementation details and names so I will create some ones. For example, if the API exposed is similar to how Gradle tasks work, I.E. an fun interface GitHubActionKotlinDSL {
fun GitHubDSL.run()
} Implemented in an included build: val fooWorkflow = GitHubActionKotlinDSL {
// implement the foo workflow with the DSL here
}
val barWorkflow = GitHubActionKotlinDSL {
// implement the bar workflow with the DSL here
} And the Kotlin Plugin applied (root project): plugins {
id("gha-dsl-gradle-plugin") // whatever name
}
gitHubActionsKotlinDSL {
workflows.set(listOf(fooWorkflow, barWorkflow))
// or
workflows(fooWorkflow, barWorkflow)
} A Gradle task with whatever Another advantage is, those foo/bar workflows can be published to MavenCentral and added to any Gradle project too. |
@JavierSegoviaCordoba writing a Gradle plugin is possible |
It would be nice to have this, but I guess it's not needed for v1. |
For https://github.com/typesafegithub/yaml2kotlin I'm entirely focused on the web app solution, not on the CLI |
What feature do you need?
An executable, let's calll it gakd for now, (not an actual good name), to make it easier to get started with the library and with the manual boring tasks.
See discussion at https://kotlinlang.slack.com/archives/C02UUATR7RC/p1664388882767549
Do you have an example usage?
Is there a workaround for not having this feature? If yes, please describe it.
Writing some ugly bash script
The text was updated successfully, but these errors were encountered: