On Sep 10, 2009, at 3:34 AM, Steve Appling wrote:

I would like to start cleaning up some of the dependencies that are shared between different subprojects in gradle. I think I would like to use a technique that we were originally using in my company's project. In the root build.gradle I would like to define a map called libraries that defines the different library dependencies used in the projects.

For example:
libraries = [
       ant             : 'org.apache.ant:ant:1....@jar',
       ant_launcher    : 'org.apache.ant:ant-launcher:1....@jar',
       antlr           : 'antlr:antlr:2....@jar',
       asm_all         : 'asm:asm-all:2....@jar',
       commons_cli     : 'commons-cli:commons-cli:1...@jar',
       commons_io      : 'commons-io:commons-io:1...@jar',
       groovy          : 'org.codehaus.groovy:groovy:1....@jar',
       ant_junit       : 'org.apache.ant:ant-junit:1....@jar',
   ]

In the build.gradles in subprojects, they would be referenced like:

dependencies {
  compile libraries.commons_io
}

Does this seem like an OK way to organize them?

I like this approach. It would be nice to make this also work for modules (first we have to make them usable in multi-project builds of course).

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to