On Mon, Jul 7, 2014 at 6:45 PM, KARR, DAVID <dk0...@att.com> wrote: > > > > > *From:* Luke Daley [mailto:luke.da...@gradleware.com] > *Sent:* Monday, July 07, 2014 5:09 PM > *To:* dev@gradle.codehaus.org > *Subject:* Re: [gradle-dev] user guide: Possible to exclude any "compile" > dependencies from "runtime"? > > > > > > > > On 8 July 2014 at 5:34:17 am, KARR, DAVID (dk0...@att.com) wrote: > > I'm just checking the accuracy of a statement in the user guide. > > The set of dependencies in the "runtime" configuration includes the > dependencies specified in the "runtime" section in addition to the > dependencies specified in the "compile" section (I use the terms > "configuration" and "section" to distinguish between the final dependency > list used at build time, compared to the list of dependencies specified in > the build script. > > The use of ‘section’ here is confusing. > > The user guide actually says "By default, also includes the compile time > dependencies." If you say "by default", that usually means you can change > it. So, is there any way in the "runtime" configuration to exclude > dependencies that were specified in the "compile" configuration? > > Yes… > > configurations { > > runtime.extendsFrom -= [compile] > > } > > I’m confused. How does this exclude dependencies from the “compile” > configuration? This is just stating what I assume is the default, which is > that the “runtime” configuration extends from the “compile” configuration. > Can you then exclude some of those dependencies “inherited” from the > “compile” configuration? >
Note the operator in Luke's example is '-=' (minus equals) -- Darrell (Daz) DeBoer http://www.gradleware.com