Hello, does anybody have an example of Gradle scri...
# getting-started
Hello, does anybody have an example of Gradle script with Kotlin DSL (
) where I can input custom arguments when running? Actually, as I understand, I need to define new task that can take command-line input and invoke the main.
Are you talking about kotlinc or about Gradle tasks?
My task is indeed, running my project in a container with different input parameters. I thought I need to create a new task in
and pass the parameters to it. That's why I asked this question indeed. If you have any recommendations, I appreciate it.
you can check -P and -D
I think you just want to apply the
plugin: https://docs.gradle.org/current/userguide/application_plugin.html#header
Assuming you're talking about invoking your kotlin code with runtime command line arguments, not a gradle task
There's also
now, which doesn't require creating a new Gradle task.