Mercurial > public > develkit
comparison init.gradle @ 101:df191eeb14ac
USASR-800: upgrade for grale 1.0-ml9
author | smith@nwoca.org |
---|---|
date | Sat, 31 Mar 2012 18:28:13 +0100 |
parents | 44c4cb9d0fed |
children | 8ac4e506ca7b |
comparison
equal
deleted
inserted
replaced
100:44c4cb9d0fed | 101:df191eeb14ac |
---|---|
1 | 1 |
2 gradle.ssdtDevelkitLocation = gradle.hasProperty('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit' | 2 gradle.ext.ssdtDevelkitLocation = gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit' |
3 | 3 |
4 ant.property(file: System.getProperty('user.home') + "/.ssdt/private.properties") | 4 ant.property(file: System.getProperty('user.home') + "/.ssdt/private.properties") |
5 gradle.ivyUserDir = ant.properties['ivy.default.ivy.user.dir'] ?: System.getProperty('user.home') + "/.ivy2" | 5 gradle.ext.ivyUserDir = ant.properties['ivy.default.ivy.user.dir'] ?: System.getProperty('user.home') + "/.ivy2" |
6 | 6 |
7 loadEnvironments() | 7 loadEnvironments() |
8 | 8 |
9 gradle.addListener(new ArtifactoryGradleSettings()) | 9 gradle.addListener(new ArtifactoryGradleSettings()) |
10 | 10 |
11 gradle.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} | 11 gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} |
12 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)" | 12 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)" |
13 | 13 |
14 if (gradle.bambooBuild) { | 14 if (gradle.bambooBuild) { |
15 gradle.ssdtGradlekitLocation = gradle.hasProperty('ssdtGradlekitLocation') ? gradle.ssdtGradlekitLocation : 'http://hg.ssdt-ohio.org/ssdt/gradlekit/raw-file/tip' | 15 gradle.ssdtGradlekitLocation = gradle.hasProperty('ssdtGradlekitLocation') ? gradle.ssdtGradlekitLocation : 'http://hg.ssdt-ohio.org/ssdt/gradlekit/raw-file/tip' |
16 apply from: "${gradle.ssdtGradlekitLocation}/artifactory.gradle" | 16 apply from: "${gradle.ssdtGradlekitLocation}/artifactory.gradle" |
68 } | 68 } |
69 } | 69 } |
70 add(new org.apache.ivy.plugins.resolver.URLResolver()) { | 70 add(new org.apache.ivy.plugins.resolver.URLResolver()) { |
71 name = 'ssdt-snapshots' | 71 name = 'ssdt-snapshots' |
72 m2compatible = true | 72 m2compatible = true |
73 url = "${ssdtArtifactory}/ssdt-snapshots" | 73 def url = "${ssdtArtifactory}/ssdt-snapshots" |
74 addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]") | 74 addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]") |
75 addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]") | 75 addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]") |
76 addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml") | 76 addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml") |
77 checkmodified = true | 77 checkmodified = true |
78 changingMatcher = 'regexp' | 78 changingMatcher = 'regexp' |
79 changingPattern = '.*SNAPSHOT' | 79 changingPattern = '.*SNAPSHOT' |
80 } | 80 } |
81 add(new org.apache.ivy.plugins.resolver.URLResolver()) { | 81 add(new org.apache.ivy.plugins.resolver.URLResolver()) { |
82 name = 'ssdt-releases' | 82 name = 'ssdt-releases' |
83 m2compatible = false | 83 m2compatible = false |
84 url = "${ssdtArtifactory}/ssdt-releases" | 84 def url = "${ssdtArtifactory}/ssdt-releases" |
85 addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]") | 85 addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]") |
86 addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]") | 86 addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]") |
87 addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml") | 87 addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml") |
88 } | 88 } |
89 mavenRepo name: 'ssdt-repo', url: "${ssdtArtifactory}/ssdt-repo" | 89 mavenRepo name: 'ssdt-repo', url: "${ssdtArtifactory}/ssdt-repo" |
118 def loadEnvironments() { | 118 def loadEnvironments() { |
119 def developerPrivate = new Properties() | 119 def developerPrivate = new Properties() |
120 if (file('private.properties').exists()) { | 120 if (file('private.properties').exists()) { |
121 developerPrivate.load(file('private.properties').newReader()) | 121 developerPrivate.load(file('private.properties').newReader()) |
122 } | 122 } |
123 setProperty 'env', (hasProperty('env') ? env : (developerPrivate.env ?: 'dev')) | 123 gradle.ext.env = (gradle.ext.has('env') ? gradle.env : (developerPrivate.env ?: 'dev')) |
124 println "Environment is: $env" | 124 println "Environment is: $gradle.env" |
125 def slurper = new ConfigSlurper(env) | 125 def slurper = new ConfigSlurper(gradle.env) |
126 def environment = new ConfigObject() | 126 def environment = new ConfigObject() |
127 def environments = [] | 127 def environments = [] |
128 file('.').eachFileMatch(~/^environment.*\.groovy$/) { envFile -> | 128 file('.').eachFileMatch(~/^environment.*\.groovy$/) { envFile -> |
129 def envName = envFile.name - '.groovy' | 129 def envName = envFile.name - '.groovy' |
130 logger.info("loading environment $envFile.name") | 130 logger.info("loading environment $envFile.name") |
131 def envCfg = slurper.parse(envFile.toURL()) | 131 def envCfg = slurper.parse(envFile.toURL()) |
132 envCfg.merge(slurper.parse(developerPrivate)) | 132 envCfg.merge(slurper.parse(developerPrivate)) |
133 environment.merge(envCfg) | 133 environment.merge(envCfg) |
134 if (envName != 'environment' ) { | 134 if (envName != 'environment' ) { |
135 setProperty envName,envCfg | 135 gradle.ext[envName] =envCfg |
136 environments << envName | 136 environments << envName |
137 } | 137 } |
138 } | 138 } |
139 environment.merge(slurper.parse(developerPrivate)) | 139 environment.merge(slurper.parse(developerPrivate)) |
140 environments << 'environment' | 140 environments << 'environment' |
141 setProperty 'environment', environment | 141 gradle.ext.environment = environment |
142 setProperty 'environments', environments | 142 gradle.ext.environments = environments |
143 } | 143 } |