# Transitive dependencies on files(...) are included even if configuration's 'transitive' property is explicitly set to 'false'

**URL:** <https://discuss.gradle.org/t/transitive-dependencies-on-files-are-included-even-if-configurations-transitive-property-is-explicitly-set-to-false/871>\
**Category:** Old Forum Archive\
**Created:** [October 20, 2014, 9:29pm UTC](https://discuss.gradle.org/t/transitive-dependencies-on-files-are-included-even-if-configurations-transitive-property-is-explicitly-set-to-false/871 "2014-10-20T21:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enterit](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@enterit](https://discuss.gradle.org/u/enterit)\
**Post date:** [October 20, 2014, 9:29pm UTC](https://discuss.gradle.org/t/transitive-dependencies-on-files-are-included-even-if-configurations-transitive-property-is-explicitly-set-to-false/871/1 "2014-10-20T21:29:00Z")

</div>

Imagine you have a project with two subprojects.

root:

```gradle
apply plugin: 'java'
repositories { mavenCentral() }
task libs(type: Sync) {
    from configurations.detachedConfiguration(dependencies.project(path: ':b', configuration: 'compile'))
    into 'libs'
}

```

a:

```gradle
apply plugin: 'java'
dependencies {
    compile files('build.gradle')
}

```

b:

```gradle
apply plugin: 'java'
configurations { compile { transitive = false } }
dependencies {
    compile project(':a')
}

```

If you execute ‘gradle libs’, you’ll get two jar-files in the libs folder: a.jar, and build.gradle Since project ‘b’ has transitive flag set to false for compile configuration, I would expect the resulting folder to include only a.jar.

If you replace ‘from’ argument by this implementation, you’ll get a single jar-file (a.jar) in the libs folder.

```gradle
from project(':b').configurations.compile

```

Current behavior of detached configuration looks like a bug. is this a bug indeed?

I could use the workaround that I have mentioned, but it also requires direct call of ‘project(’:b’).evaluate()’, otherwise it’s compile configuration might be empty.

Gradle versions tested: 1.12, 2.1.
