Mercurial > public > develkit
diff init.gradle @ 168:7f023317034b
add helper to normalize springframework to non-osgi jars
author | Dave Smith <smith@nwoca.org> |
---|---|
date | Wed, 29 Jan 2014 16:33:39 +0000 |
parents | 9947c2c8ff44 |
children | c4b7c8a11913 |
line wrap: on
line diff
--- a/init.gradle Tue Jan 21 15:47:27 2014 +0000 +++ b/init.gradle Wed Jan 29 16:33:39 2014 +0000 @@ -23,6 +23,17 @@ gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim() } catch (e) { } +def springModuleTranslator = ['spring-transaction':'spring-tx'].withDefault { it } + +gradle.ext.normalizeSpring = { DependencyResolveDetails details -> + if (details.requested.group == 'org.springframework') { + if (details.requested.name.startsWith ('org.springframework.' )) { + def shortName = springModuleTranslator[details.requested.name.replace('org.springframework.', 'spring-').replace('.','-')] + details.useTarget(group: 'org.springframework', name: shortName, version: details.requested.version) + } + } + } + gradle.ext.branchName = System.getenv('bamboo_planRepository_branch') gradle.ext.branchStream = ""