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?

It does. How will you add libraries which need to be declared as a module (eg groovy)?


Adam


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

   http://xircles.codehaus.org/manage_email


Reply via email to