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