# Gradle 2.5: Upload task not working?

**URL:** <https://discuss.gradle.org/t/gradle-2-5-upload-task-not-working/10509>\
**Category:** Bugs\
**Tags:** issue-acknowledged, gradle-3318\
**Created:** [July 9, 2015, 8:51am UTC](https://discuss.gradle.org/t/gradle-2-5-upload-task-not-working/10509 "2015-07-09T08:51:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Graeme\_Rocher1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/graeme_rocher1/32/1520_2.png) [@Graeme\_Rocher1](https://discuss.gradle.org/u/Graeme_Rocher1)\
**Post date:** [July 10, 2015, 9:31am UTC](https://discuss.gradle.org/t/gradle-2-5-upload-task-not-working/10509/3 "2015-07-10T09:31:12Z")

</div>

So this turned out to be nothing to do with the `Upload` task. Instead this syntax works in Gradle 2.3 but fails in Gradle 2.5:

```
task install(dependsOn: subprojects.collect { Project p -> p.tasks.withType(PublishToMavenLocal)})

```

In Gradle 2.3 with the above defined in your root build it will execute all subproject `PublishToMavenLocal` tasks. In Gradle 2.5 it executes none of them.

---

_[View the full topic](https://discuss.gradle.org/t/gradle-2-5-upload-task-not-working/10509)._
