Skip to content

ConfigurableFileCollections used as output properties should automatically contain implicit task dependencies #32311

@Vampire

Description

@Vampire

Expected Behavior

Using the code shown below should have a task dependency from bar to foo automatically.
You can of course mitigate it by using foo.map { it.foo } which is anyway better due to preserving task-configuration avoidance,
or by using bar.from(foo) as long as foo is the only output property.

But it would be nice if this worked. :-)

Context

abstract class Foo : DefaultTask() {
    @get:OutputFiles
    abstract val foo: ConfigurableFileCollection
}
abstract class Bar : DefaultTask() {
    @get:InputFiles
    abstract val bar: ConfigurableFileCollection
}
val foo by tasks.registering(Foo::class)
val bar by tasks.registering(Bar::class) {
    bar.from(foo.get().foo)
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions