# Tasks disabled for included builds

**URL:** <https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711>\
**Category:** Buildship\
**Created:** [February 22, 2017, 1:50pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711 "2017-02-22T13:50:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thokuest](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/thokuest/32/5975_2.png) [@thokuest](https://discuss.gradle.org/u/thokuest)\
**Post date:** [February 22, 2017, 1:50pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711/1 "2017-02-22T13:50:29Z")

</div>

I have two projects, first one generates source code (`producer`) using a description file and a custom task and the second (`consumer`) consumes the generated code.

I now use the composite build feature (`includeBuild`) to create a nice Eclipse project link between `producer` and `consumer`. Unfortunately, when I change the description file, I’m unable to generate the source code anew because the task is disabled:

> Cannot run tasks for included builds

What is the reasoning behind that decision?

My current workaround is to create a Gradle run configuration to execute the task which is not affected by that restriction.

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [February 22, 2017, 2:06pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711/2 "2017-02-22T14:06:01Z")

</div>

> [@thokuest](#):
>
> What is the reasoning behind that decision?

It’s just not implemented in Gradle yet, something we will fix in Q2. Stay tuned 🙂

---

<div class="post-metadata">

**Author:** ![thokuest](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/thokuest/32/5975_2.png) [@thokuest](https://discuss.gradle.org/u/thokuest)\
**Post date:** [February 22, 2017, 2:13pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711/3 "2017-02-22T14:13:51Z")

</div>

> It’s just not implemented in Gradle yet

Are you sure? Maybe we’re speaking about different uses cases here. I mean, I can run the `generate` task on the `producer` project already using a custom _Gradle Task_ run configuration. All I have to do afterwards is to refresh the Eclipse project to make it aware of the change. It’s just _Buildship_ that prevents me doing so in the _Gradle Tasks_ view.

> something we will fix in Q2

Is there any issue I should be watching? 🙂

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [February 22, 2017, 2:26pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711/4 "2017-02-22T14:26:36Z")

</div>

> [@thokuest](#):
>
> I mean, I can run the generate task on the producer project already using a custom Gradle Task run configuration.

What you’re doing there is just running `producer` as if it was a separate build, ignoring the composite definition. So that’s not the same.

> [@thokuest](#):
>
> Is there any issue I should be watching?

There is none at the moment. It is mentioned as a limitation in the user guide and we will announce the improvement in the release notes as soon as it’s done. But please feel free to open an issue.

---

<div class="post-metadata">

**Author:** ![thokuest](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/thokuest/32/5975_2.png) [@thokuest](https://discuss.gradle.org/u/thokuest)\
**Post date:** [February 22, 2017, 2:34pm UTC](https://discuss.gradle.org/t/tasks-disabled-for-included-builds/21711/5 "2017-02-22T14:34:38Z")

</div>

Thanks for answering that fast! Yes, you’re right, it’s just ignoring the composite definition. I just feel a bit hindered. Nothing to worry about.
