comparison init.gradle @ 94:1290b23e7b76

modify ivy and gradle to use same local repo
author smith@nwoca.org
date Sat, 03 Mar 2012 21:19:58 +0000
parents 90325a10fe95
children ebb42488396a
comparison
equal deleted inserted replaced
93:f351338a3b3a 94:1290b23e7b76
1 1
2 gradle.ssdtDevelkitLocation = gradle.hasProperty('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit' 2 gradle.ssdtDevelkitLocation = gradle.hasProperty('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'
3
4 ant.property(file: System.getProperty('user.home') + "/.ssdt/private.properties")
5 if (ant.properties['ivy.default.ivy.user.dir']) {
6 gradle.ivyUserDir = ant.properties['ivy.default.ivy.user.dir'] ?: System.getProperty('user.home') + "/.ivy2"
7 }
3 8
4 gradle.addListener(new ArtifactoryGradleSettings()) 9 gradle.addListener(new ArtifactoryGradleSettings())
5 10
6 gradle.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} 11 gradle.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')}
7 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)" 12 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)"
29 34
30 def local = project.repositories.find { it.name == 'local' } 35 def local = project.repositories.find { it.name == 'local' }
31 if ( local ) { 36 if ( local ) {
32 logger.info "removing local repo: $it" 37 logger.info "removing local repo: $it"
33 new File(System.properties['user.home'] + "/.ssdt/local-repo").deleteDir() 38 new File(System.properties['user.home'] + "/.ssdt/local-repo").deleteDir()
39 new File(gradle.ivyUserDir + "/local").deleteDir()
34 } 40 }
35 } 41 }
36 42
37 cleanLocal.onlyIf { 43 cleanLocal.onlyIf {
38 project.repositories.any { it.name == 'local' } 44 project.repositories.any { it.name == 'local' }
53 } 59 }
54 repositories { 60 repositories {
55 if (!gradle.bambooBuild) { 61 if (!gradle.bambooBuild) {
56 add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) { 62 add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
57 name = 'local' 63 name = 'local'
58 addIvyPattern System.properties['user.home'] + "/.ssdt/local-repo/[module]-ivy-[revision].xml" 64 addIvyPattern gradle.ivyUserDir + "/local/[module]-ivy-[revision].xml"
59 addArtifactPattern System.properties['user.home'] + "/.ssdt/local-repo/[module]-[revision](-[classifier]).[ext]" 65 addArtifactPattern gradle.ivyUserDir + '/local/[module]-[revision](-[classifier]).[ext]'
60 descriptor = 'optional' 66 descriptor = 'optional'
61 checkmodified = true 67 checkmodified = true
68 changingMatcher = 'regexp'
69 changingPattern = '.*SNAPSHOT'
70 force = true
62 } 71 }
63 } 72 }
64 add(new org.apache.ivy.plugins.resolver.URLResolver()) { 73 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
65 name = 'ssdt-snapshots' 74 name = 'ssdt-snapshots'
66 m2compatible = true 75 m2compatible = true