changeset 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
files init.gradle
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/init.gradle	Mon Mar 12 21:04:49 2012 +0100
+++ b/init.gradle	Sat Mar 31 18:28:13 2012 +0100
@@ -1,14 +1,14 @@
 
-gradle.ssdtDevelkitLocation = gradle.hasProperty('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'
+gradle.ext.ssdtDevelkitLocation = gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'
 
 ant.property(file: System.getProperty('user.home') + "/.ssdt/private.properties")
-gradle.ivyUserDir = ant.properties['ivy.default.ivy.user.dir'] ?: System.getProperty('user.home') + "/.ivy2"
+gradle.ext.ivyUserDir = ant.properties['ivy.default.ivy.user.dir'] ?: System.getProperty('user.home') + "/.ivy2"
 
 loadEnvironments()
 
 gradle.addListener(new ArtifactoryGradleSettings())
 
-gradle.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')}
+gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')}
 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)"
 
 if (gradle.bambooBuild) {
@@ -70,7 +70,7 @@
                 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
                     name = 'ssdt-snapshots'
                     m2compatible =  true
-                    url = "${ssdtArtifactory}/ssdt-snapshots"
+                    def url = "${ssdtArtifactory}/ssdt-snapshots"
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]")
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]")
                     addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml")
@@ -81,7 +81,7 @@
                 add(new org.apache.ivy.plugins.resolver.URLResolver()) {                
                     name = 'ssdt-releases'
                     m2compatible = false
-                    url = "${ssdtArtifactory}/ssdt-releases"
+                    def url = "${ssdtArtifactory}/ssdt-releases"
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]")
                     addArtifactPattern("${url}/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]")
                     addIvyPattern("${url}/[organization]/[module]/ivy-[revision].xml")                   
@@ -120,9 +120,9 @@
     if (file('private.properties').exists()) {
         developerPrivate.load(file('private.properties').newReader())
     }
-    setProperty 'env', (hasProperty('env') ? env : (developerPrivate.env ?: 'dev'))
-    println "Environment is: $env"
-    def slurper = new ConfigSlurper(env)
+    gradle.ext.env = (gradle.ext.has('env') ? gradle.env : (developerPrivate.env ?: 'dev'))
+    println "Environment is: $gradle.env"
+    def slurper = new ConfigSlurper(gradle.env)
     def environment = new ConfigObject()
     def environments = []
     file('.').eachFileMatch(~/^environment.*\.groovy$/) { envFile ->
@@ -132,12 +132,12 @@
         envCfg.merge(slurper.parse(developerPrivate))
         environment.merge(envCfg)        
         if (envName != 'environment' ) { 
-           setProperty envName,envCfg 
+           gradle.ext[envName] =envCfg 
            environments << envName
         }
     }    
     environment.merge(slurper.parse(developerPrivate))
     environments << 'environment'
-    setProperty 'environment', environment
-    setProperty 'environments', environments
+    gradle.ext.environment = environment
+    gradle.ext.environments = environments
 }