You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workaround I came up with was to filter out any task dependencies that come from included builds, i.e.
// ignore dependencies from included builds from the upTask shouldRunAfter dependencies// (comparing on projectDir may not be the best - is name reliable?)val includedBuildDirectories = gradle.includedBuilds.map { it.projectDir }
val filteredTaskDependencies = taskDependencies.getDependencies(null).filter {
val includeTask = it.project.projectDir !in includedBuildDirectories
println("${ if (includeTask) "including"else"excluding"} task: ${it.path} from ${it.project.name}")
includeTask
}
upTask.get().shouldRunAfter(filteredTaskDependencies)
The text was updated successfully, but these errors were encountered:
Hello, thank you very much for the reproducer and for the time you spent on it 👍
This usage of shouldRunAfter is actually just an optimization, so I think that we could include your workaround to the code base.
May I ask you to prepare a small PR to include this change? 🙏
When using
isRequiredBy
in a Gradle project that uses composite builds you get the following error:This issue seems to be caused by a combination of:
shouldRunAfter task.taskDependencies
inisRequiredBy()
)shouldRunAfter
This affects all versions of the plugin after
0.16.13
when used with Gradle 8.+ and a composite build that makes use ofisRequiredBy
.I have created a reproducer that demonstrates the problem: https://github.com/jamesbassett/compose-plugin-reproducer
The workaround I came up with was to filter out any task dependencies that come from included builds, i.e.
The text was updated successfully, but these errors were encountered: