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