Slackbot
11/30/2023, 7:17 PMJavi
11/30/2023, 7:33 PMprop.get() or prop.orNullDinesh Kannan Rajaram
11/30/2023, 7:35 PMproperties["option-1"] in my case ?Javi
11/30/2023, 7:36 PMJavi
11/30/2023, 7:37 PMval myVariable: Property<String>
myVariable.orNullDinesh Kannan Rajaram
11/30/2023, 7:39 PM./gradlew :myTask --download-path="/here/file.ext"
tassk.register("myTask",Myclass::class){
println(downloadPath.get())
}
This throws error
> Cannot query the value of task ':myTask' property 'downloadPath' because it has no value available.Javi
11/30/2023, 7:41 PMorNullJavi
11/30/2023, 7:41 PMdoLast { … }Dinesh Kannan Rajaram
11/30/2023, 7:50 PMdoLast{ ... } means its gonna execute after the taskAction right. I need to check this before the taskAction is executed. use case is that if the option --download-path is not provided I need to check a few things and then set its value.Dinesh Kannan Rajaram
11/30/2023, 7:51 PMJavi
11/30/2023, 7:55 PMdoFirstDinesh Kannan Rajaram
11/30/2023, 7:55 PM--download-pathJavi
11/30/2023, 7:56 PMDinesh Kannan Rajaram
11/30/2023, 8:00 PM@Outputfile which is kinda dependent on the --download-path if provided and I couldn't achieve that from within the taskActionJavi
11/30/2023, 8:02 PMJavi
11/30/2023, 8:02 PMDinesh Kannan Rajaram
11/30/2023, 8:03 PMJavi
11/30/2023, 8:05 PMregister do myProperty.convention(“…”) or myProperty.set(“…”)Javi
11/30/2023, 8:06 PMDinesh Kannan Rajaram
11/30/2023, 8:06 PM