annotate init.gradle @ 76:15a5fd89d80b

add display of envs for bamboo testing
author smith@nwoca.org
date Mon, 06 Feb 2012 14:19:18 -0500
parents 02cc8e50945e
children e9605748e5ce
rev   line source
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
1
74
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
2 logger.debug("applying SSDT artifactory Gradle Settings")
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
3
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
4 gradle.addListener(new ArtifactoryGradleSettings())
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
5
76
15a5fd89d80b add display of envs for bamboo testing
smith@nwoca.org
parents: 75
diff changeset
6 println "Environment: "
15a5fd89d80b add display of envs for bamboo testing
smith@nwoca.org
parents: 75
diff changeset
7 println "----------------------------"
15a5fd89d80b add display of envs for bamboo testing
smith@nwoca.org
parents: 75
diff changeset
8 System.getenv().each { k,v -> println " $k = $v" }
15a5fd89d80b add display of envs for bamboo testing
smith@nwoca.org
parents: 75
diff changeset
9
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
10 subprojects {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
11
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
12 task cleanLocal << {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
13 def local = project.repositories.find { it.name == 'local' }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
14 println local
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
15 if ( local ) {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
16
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
17 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
18 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
19
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
20 task publishLocal(dependsOn: 'uploadArchives') << { println "published to local repository" }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
21
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
22 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
23
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
24
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
25 class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener {
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
26
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
27 def void projectsEvaluated(Gradle gradle) {
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
28
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
29 Project root = gradle.getRootProject()
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
30 root.subprojects {
74
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
31
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
32 configurations.all {
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
33 resolutionStrategy.cacheChangingModulesFor 120, 'minutes'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
34 resolutionStrategy.cacheDynamicVersionsFor 120, 'minutes'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
35 }
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
36
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
37 buildscript {
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
38 repositories {
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
39 mavenRepo name: 'plugins-repo', url: "http://repos.ssdt.nwoca.org/artifactory/gradle-plugins"
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
40 }
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
41 }
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
42
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
43 repositories {
74
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
44
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
45 flatDir {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
46 name "local"
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
47 dirs System.properties['user.home'] + "/.ssdt/local-repo"
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
48 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
49
74
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
50 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
51 name = 'ssdt-snapshots'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
52 m2compatible = true
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
53 url = 'http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
54 addArtifactPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]')
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
55 addIvyPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-snapshots/[organization]/[module]/ivy-[revision].xml')
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
56 checkmodified = true
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
57 changingMatcher = 'regexp'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
58 changingPattern = '.*SNAPSHOT'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
59 }
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
60 add(new org.apache.ivy.plugins.resolver.URLResolver()) {
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
61 name = 'ssdt-releases'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
62 m2compatible = false
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
63 url = 'http://repos.ssdt.nwoca.org/artifactory/ssdt-releases'
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
64 addArtifactPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-releases/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]')
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
65 addIvyPattern('http://repos.ssdt.nwoca.org/artifactory/ssdt-releases/[organization]/[module]/ivy-[revision].xml')
a622ec40a570 update repo definitions
smith@nwoca.org
parents: 73
diff changeset
66 }
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
67 mavenRepo name: 'ssdt-repo', url: 'http://repos.ssdt.nwoca.org/artifactory/ssdt-repo'
75
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
68
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
69 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
70
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
71 uploadArchives {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
72 repositories {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
73 if ( project.repositories.find { it.name == 'local' } ) {
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
74 add project.repositories.local
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
75 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
76 }
02cc8e50945e allow local file repo for local builds
smith@nwoca.org
parents: 74
diff changeset
77 }
73
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
78 }
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
79 }
174b4bcfd2f2 fix gradle init script
smith@nwoca.org
parents:
diff changeset
80 }