Kelvin Chung
04/01/2024, 12:43 AMabstract class MyTask @Inject constructor(private val layout: ProjectLayout) : DefaultTask()
and this:
abstract class MyTask : DefaultTask() {
private val layout = project.layout
}
It seems like the first is preferred over the second - any insights as to why that is?Vampire
04/01/2024, 3:13 AMabstract class MyTask : DefaultTask() {
@get:Inject
protected val layout: ProjectLayout
}Vampire
04/01/2024, 3:15 AMExecOperations then latest then you need to inject and then it is more consistent to always inject, either like your first or my version.