Support excluding transitive dependencies in the dependencies DSL #107

Closed
bamboo opened this Issue Jul 28, 2016 · 0 comments

Projects

None yet

1 participant

@bamboo
Member
bamboo commented Jul 28, 2016 edited

And configuring additional dependency properties in a statically-typed/IDE friendly way:

        dependencies {

            default(group = "org.gradle", name = "foo", version = "1.0") {
                isForce = true
            }

            compile(group = "org.gradle", name = "bar") {
                exclude(module = "foo")
            }

            runtime("org.gradle:baz:1.0-SNAPSHOT") {
                isChanging = true
                isTransitive = false
            }

            testCompile(group = "junit", name = "junit")

            testRuntime(project(path = ":core")) {
                exclude(group = "org.gradle")
            }
        }

The current workaround is to cast the returned dependency to ModuleDependency and call exclude(Map<String, String>) which is not very convenient:

(compile("module-with-transitive-dependencies") as ModuleDependency).apply {
    exclude(mapOf("module" to "excluded-module"))
}

See the relevant section in the user guide.

@bamboo bamboo added this to the 0.3.1 milestone Jul 28, 2016
@bamboo bamboo self-assigned this Aug 2, 2016
@bamboo bamboo added a commit that closed this issue Aug 2, 2016
@bamboo bamboo Improve dependencies DSL
To allow statically-typed, IDE friendly, inline configuration of
dependency attributes.

Resolves #107
d7c261d
@bamboo bamboo closed this in d7c261d Aug 2, 2016
@bamboo bamboo added a commit that referenced this issue Aug 2, 2016
@bamboo bamboo Introduce `Configuration.exclude` extension
See #107
21c9600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment