# Extending from other project's configuration

**URL:** <https://discuss.gradle.org/t/extending-from-other-projects-configuration/30041>\
**Category:** Help/Discuss\
**Created:** [January 2, 2019, 4:56pm UTC](https://discuss.gradle.org/t/extending-from-other-projects-configuration/30041 "2019-01-02T16:56:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hert](https://avatars.discourse-cdn.com/v4/letter/h/c6cbf5/32.png) [@hert](https://discuss.gradle.org/u/hert)\
**Post date:** [January 2, 2019, 4:56pm UTC](https://discuss.gradle.org/t/extending-from-other-projects-configuration/30041/1 "2019-01-02T16:56:36Z")

</div>

I am working to update our build to use Gradle 5.0 and encountered warning messages such as this:

`The configuration :server:api:external was resolved without accessing the project in a safe manner. This may happen when a configuration is resolved from a thread not managed by Gradle or from a different project. See https://docs.gradle.org/5.0/userguide/troubleshooting_dependency_resolution.html#configuration_resolution_constraints for more details. This behaviour has been deprecated and is scheduled to be removed in Gradle 6.0.`

I know where in our custom tasks this is coming from and the referenced documentation provides a good suggestion for how to resolve it:

> In most cases, the deprecation warning can be fixed by defining a configuration in the project where the resolution is occurring and setting it to [extend from](https://docs.gradle.org/5.0/javadoc/org/gradle/api/artifacts/Configuration.html#extendsFrom-org.gradle.api.artifacts.Configuration...-) the configuration in the other project.

So, I set up my configuration like so:

```
project.configurations 
{
     dedup.extendsFrom(project.project(":server:api").configurations.external)
}

```

When it comes time to use this dedup configuration, I find that, though the configuration object indicates it extends from “:server:api.configurations.external”, the file collection it resolves to is the collection for the external configuration for THIS project, not the “:server:api” project.

Am I missing something here? I had thought that it might be an evaluation ordering problem, but then I would expect that the configuration would have nothing in it, not the dependencies from this project.

Thanks!

Susan
