Sorry, I didn't know configuration level exclude before. Yes, the above
example can be solved by configuration level exclude.

But, how about just applying a same configure to multiple dependencies?
Such as transitive, force, or classifier...

// I don't want close transitive for the whole configuration, except
these tworuntime (dep1, dep2) {
  transitive = false
}


I think it helps.


On Wed, Apr 10, 2013 at 5:50 AM, Adam Murdoch
<adam.murd...@gradleware.com>wrote:

>
> On 10/04/2013, at 1:44 AM, think wu <yingxinw...@gmail.com> wrote:
>
>
> GRADLE-2742 <http://issues.gradle.org/browse/GRADLE-2742>
>
> For now (Gradle 1.5), I have to do this:
>
> runtime('commons-vfs:commons-vfs:1.0') {
>     exclude group: 'commons-logging', module: 'commons-logging'
> }
>
> runtime("org.springframework:spring-webmvc:$springVer") {
>     exclude group: 'commons-logging', module: 'commons-logging'
> }
>
> But there's a better solution in Grails, looks like:
>
> runtime('commons-vfs:commons-vfs:1.0', 
> "org.springframework:spring-webmvc:$springVer") {
>     exclude group: 'commons-logging', module: 'commons-logging'
> }
>
>
> I'd like to bring this syntax to Gradle. What do you think about it?
>
>
> Why don't you just use a configuration-level exclude?
>
> runtime.exclude group: 'commons-logging', module: 'commons-logging'
>
>
> --
> Adam Murdoch
> Gradle Co-founder
> http://www.gradle.org
> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
> http://www.gradleware.com
>
> Join us at the Gradle Summit 2013, June 13th and 14th in Santa Clara, CA:
> http://www.gradlesummit.com
>
>


-- 

Best Regrads
吴颖昕 Yingxin Wu

"Information is not knowledge."* Albert Einstein*

Contact me: [image: Google Talk/]yingxinwu.g

Reply via email to