Hi, I've created a pull request for this improvement. https://github.com/gradle/gradle/pull/147 What do you think of it?
I tried `compile (dep1, dep2) config` (and failed) more than once before I know Grails do has it. I think syntax as such should be imaginable, even natural, since we can write `compile dep1, dep2` and `compile dep1 config` in Gradle. I'll be very glad to see it in the next Gradle version, if you approve it. -- Best Regards 吴颖昕 Yingxin Wu (http://www.xinthink.com/) "Information is not knowledge." Albert Einstein 在 2013年4月10日星期三,下午12:53,think wu 写道: > 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 > two runtime (dep1, dep2) { transitive = false } > > I think it helps. > > > On Wed, Apr 10, 2013 at 5:50 AM, Adam Murdoch <adam.murd...@gradleware.com > (mailto:adam.murd...@gradleware.com)> wrote: > > > > On 10/04/2013, at 1:44 AM, think wu <yingxinw...@gmail.com > > (mailto: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: yingxinwu.g > > >