Not really a kotlin question, but rather a gradle. How should we check if option like `--info` or `-...
a
Not really a kotlin question, but rather a gradle. How should we check if option like
--info
or
--verbose
is passed within a task ๐Ÿ‘€ when creating the task blob thinking upside down
r
Thereโ€™s a gradle slack: https://gradle-community.slack.com/
a
Oh thanks! ๐Ÿ˜…
Btw I found something java-related, is there's kts equivalent (and maybe smaller, probably not defining a task class) https://docs.gradle.org/current/userguide/custom_tasks.html#example_declaring_a_command_line_option
r
It sounds like you want logging levels; I think you should just be logging at the appropriate level in your task, and letting gradle handle the command line level option: https://docs.gradle.org/current/userguide/logging.html
๐Ÿ‘ 1
a
Oh, yep, thanks!! ๐Ÿ™‚
Still is there any way to get the option directly if passed?
r
Donโ€™t know, Iโ€™d ask in the gradle slack
๐Ÿ‘ 1
v
I think so
Copy code
gradle.startParameter.logLevel
๐Ÿ‘€ 1
๐Ÿ‘ 1