apply plugin: 'maven' repositories { mavenCentral() } LIBS = [ COMMONS_LANG: [group: 'commons-lang', name: 'commons-lang', version: '2.6'] ] configurations { test1 test2 } dependencies { test1 ( LIBS.COMMONS_LANG ) test2 ( LIBS.COMMONS_LANG ) }