How do i define the scope for a transitive dependency of a client module?


(Dimitar Dimitrov) #1

I need to do something like:

dependencies {
    compilemodule("org.codehaus.groovy:groovy-all:2.0.5") {
        dependency("commons-cli:commons-cli:1.0") {
            transitive = false
        }
        module(group: 'org.apache.ant', name: 'ant', version: '1.8.4') {
            dependencies "org.apache.ant:ant-launcher:1.8.4@jar", "org.apache.ant:ant-junit:1.8.4"
        }
    }
}

Only with the twist that I want to expose groovy-all and ant at compile time, and have ant-launcher and commons-cli only at runtime.


(Luke Daley) #2

You can’t split a client module over different configurations, so you’ll need 4 modules.