Javi
01/07/2025, 2:40 PMProvider
in the configuration phase?
If I want to throw based on a property, I must do that inside of a task? I would like to throw before any task is executed.
I know there is a #C07UNDEAF6K channel, but it has almost no members yet
Vampire
01/07/2025, 2:59 PMget()
a provider at configuration time, you introduce ordering problems, timing problems, and race conditions, as the property could have the value changed after you retrieve its value.Javi
01/07/2025, 3:12 PMafterEvaluate
Anyway I have found a bugJavi
01/07/2025, 3:12 PMProblems
API when injecting it into tasks via constructor.
This fail:
@CacheableTask
abstract class FooTask
@Inject constructor(
private val logger: Logger,
objects: ObjectFactory,
layout: ProjectLayout,
problems: Problems,
) : DefaultTask() {
...
}
But this works
@CacheableTask
abstract class FooTask
@Inject constructor(
private val logger: Logger,
objects: ObjectFactory,
layout: ProjectLayout,
) : DefaultTask() {
@Inject abstract val problems: Problems,
...
}
I would expect both to be the same.
Meanwhile, injecting via constructor in the Plugin<Project>
class is working.Donát Csikós
01/08/2025, 3:26 PMReinhold Degenfellner
03/24/2025, 3:14 PMJavi
03/25/2025, 5:29 PMJavi
03/25/2025, 5:30 PMReinhold Degenfellner
06/26/2025, 7:28 AMVampire
06/26/2025, 9:51 AMReinhold Degenfellner
07/01/2025, 6:39 AMReinhold Degenfellner
07/03/2025, 6:12 AM