# Task Configuration Avoidance and Publishing

**URL:** <https://discuss.gradle.org/t/task-configuration-avoidance-and-publishing/31411>\
**Category:** Help/Discuss\
**Created:** [April 13, 2019, 3:53am UTC](https://discuss.gradle.org/t/task-configuration-avoidance-and-publishing/31411 "2019-04-13T03:53:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkeyser](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@bkeyser](https://discuss.gradle.org/u/bkeyser)\
**Post date:** [April 13, 2019, 3:53am UTC](https://discuss.gradle.org/t/task-configuration-avoidance-and-publishing/31411/1 "2019-04-13T03:53:10Z")

</div>

When using task configuration avoidance, I have noticed that when then output of a task is used as in artifact in publishing that it is always configured. Is there a method for avoiding task configuration when its output is published?

```
publishing {
    publications {
        allResources(MavenPublication) {
            artifact generateResourceTask
        }
    }
}

```

in this case the ‘generateResourceTask’ task (and the tasks it depends upon) will always be configured.
