Наш сценарий Gradle состоит из корневого проекта «война» и нескольких (10+) дочерних проектов «jar». Каждый проект JAR зависит от многих (30-60) JAR. Частичный пример:Gradle: Как группировать зависимости в многопроектном скрипте?
dependencies {
compile 'dwr:dwr:3.0.0.117'
compile 'annotations:annotations:1.0'
compile 'abdera:abdera-core:0.4.0-incubating'
compile 'abdera:abdera-extensions-json:0.4.0-incubating'
compile 'abdera:abdera-extensions-main:0.4.0-incubating'
compile 'abdera:abdera-i18n:0.4.0-incubating'
compile 'abdera:abdera-parser:0.4.0-incubating'
compile 'aopalliance:aopalliance:1.0'
compile 'apacheds:apacheds-core:1.0.2'
compile 'apacheds:apacheds-core-shared:1.0.2'
compile 'apacheds:apacheds-kerberos-shared:1.0.2'
compile 'apacheds:apacheds-protocol-changepw:1.0.2'
compile 'apacheds:apacheds-protocol-kerberos:1.0.2'
compile 'apacheds:apacheds-protocol-ldap:1.0.2'
compile 'apacheds:apacheds-protocol-ntp:1.0.2'
compile 'apacheds:apacheds-protocol-shared:1.0.2'
compile 'apacheds:apacheds-server-jndi:1.0.2'
compile 'apacheds:apacheds-server-main:1.0.2'
compile 'apacheds:apacheds-server-ssl:1.0.2'
compile 'commons:commons-logging:1.0.4'
compile 'commons:commons-beanutils'
compile 'commons:commons-cli:1.0'
compile 'commons:commons-codec:1.3'
compile 'commons:commons-collections:3.2.1'
compile 'commons:commons-digester'
compile 'commons:commons-discovery:0.2'
compile 'commons:commons-fileupload:1.2'
compile 'commons:commons-io:1.2'
compile 'commons:commons-lang:2.4'
compile 'commons:commons-pool:1.5.4'
compile 'dom4j:dom4j-full'
compile 'ehcache:ehcache:1.6.2'
compile 'eigenbase:eigenbase-properties'
compile 'eigenbase:eigenbase-resgen'
compile 'eigenbase:eigenbase-xom'
compile 'FastInfoset:FastInfoset:1.2.7'
compile 'fop:fop'
compile 'freehep:freehep-export:2.1.1'
compile 'freehep:freehep-graphics2d:2.1.1'
compile 'freehep:freehep-graphicsio:2.1.1'
compile 'freehep:freehep-graphicsio-emf:2.1.1-adapted'
compile 'freehep:freehep-graphicsio-java:2.1.1'
compile 'freehep:freehep-graphicsio-pdf:2.1.1'
compile 'freehep:freehep-graphicsio-ps:2.1.1'
compile 'freehep:freehep-graphicsio-svg:2.1.1'
compile 'freehep:freehep-graphicsio-swf:2.1.1'
compile 'freehep:freehep-graphicsio-tests:2.1.1'
compile 'freehep:freehep-io:2.0.2'
compile 'freehep:freehep-swing:2.0.3'
compile 'freehep:freehep-util:2.0.2'
compile 'freehep:freehep-xml:2.1.1'
}
Я хотел бы избежать такой длинный дублированный список зависимостей для каждого компонента. Должен быть способ группировки зависимостей, например «freehep», «commons», «apacheds», «abdera», «dwr», и каждый компонент будет ссылаться на эти группы.