I am in the process of developing a plugin to package our software and am trying to understand dependencies using configurations. The provider of a file has the following configuration
configurations {
container
}
DownloadArtifact downloadContainer = tasks.findByName('download') as DownloadArtifact
artifacts {
container downloadContainer.destFileProperty
}
(the download task is defined in the plugin) with the dependent project having a configuration of
configurations {
containerSource
}
dependencies {
containerSource project(path: ':container', configuration: 'container')
}
the dependent project shows the dependency
containerSource
\--- project :container
In a separate plugin from the container plugin, I have the following task configuration closure
project.tasks.create(...) {
...
artifactProperty = project.configurations.containerSource.getSingleFile()
}
However, the task does not list the source project, container, as a dependency (using Doron Gold’s task tree plugin)
:services:emailservice:installContainer
\--- :services:emailservice:createDirectories
Notice that the task download (or as I have labeled it above ‘downloadContainer’) of project container is missing.
I believe I am missing a step, but not sure where. I have taken a look at some of the Gradle-provided plugins but believe the dependency wiring happens “automagically”. Thanks for your help.