|
1 | 1 | buildscript {
|
2 |
| - repositories { |
3 |
| - mavenLocal() |
4 |
| - mavenCentral() |
5 |
| - maven { |
6 |
| - url "http://repo.spring.io/snapshot" |
7 |
| - } |
8 |
| - maven { |
9 |
| - url "http://repo.spring.io/milestone" |
10 |
| - } |
11 |
| - maven { |
12 |
| - url "http://repo.spring.io/libs-release-local" |
13 |
| - } |
14 |
| - maven { |
15 |
| - url "http://repo.spring.io/libs-staging-local/" |
16 |
| - } |
17 |
| - } |
18 |
| - dependencies { |
19 |
| - classpath "org.springframework.boot:spring-boot-gradle-plugin:${BOOT_VERSION}" |
20 |
| - } |
| 2 | + repositories { |
| 3 | + mavenLocal() |
| 4 | + mavenCentral() |
| 5 | + maven { |
| 6 | + url "http://repo.spring.io/snapshot" |
| 7 | + } |
| 8 | + maven { |
| 9 | + url "http://repo.spring.io/milestone" |
| 10 | + } |
| 11 | + maven { |
| 12 | + url "http://repo.spring.io/libs-release-local" |
| 13 | + } |
| 14 | + } |
| 15 | + dependencies { |
| 16 | + classpath "org.springframework.boot:spring-boot-gradle-plugin:${BOOT_VERSION}" |
| 17 | + } |
21 | 18 | }
|
22 | 19 |
|
23 | 20 | allprojects {
|
24 |
| - apply plugin: 'java' |
| 21 | + apply plugin: 'java' |
25 | 22 | }
|
26 | 23 |
|
27 | 24 | configure(subprojects) {
|
28 | 25 |
|
29 |
| - apply plugin: 'java' |
30 |
| - apply plugin: 'eclipse' |
31 |
| - apply plugin: 'idea' |
32 |
| - apply plugin: 'org.springframework.boot' |
33 |
| - |
34 |
| - ext { |
35 |
| - systemPropsFromGradle = { |
36 |
| - project.gradle.startParameter.systemPropertiesArgs.entrySet().collect{"-D${it.key}=${it.value}"} |
37 |
| - } |
38 |
| - buildNrLoc = project.hasProperty('buildNr') ? "${buildNr}" : "1.0.0.SLEUTH_DOCS" |
39 |
| - } |
40 |
| - |
41 |
| - group = 'io.spring.cloud.sleuth.docs' |
42 |
| - version = buildNrLoc |
43 |
| - sourceCompatibility = '1.8' |
44 |
| - |
45 |
| - repositories { |
46 |
| - mavenLocal() |
47 |
| - jcenter() |
48 |
| - maven { |
49 |
| - url "http://repo.spring.io/snapshot" |
50 |
| - } |
51 |
| - maven { |
52 |
| - url "http://repo.spring.io/milestone" |
53 |
| - } |
54 |
| - maven { |
55 |
| - url "http://repo.spring.io/libs-release-local" |
56 |
| - } |
57 |
| - maven { |
58 |
| - url "http://repo.spring.io/libs-staging-local/" |
59 |
| - } |
60 |
| - } |
61 |
| - |
62 |
| - dependencyManagement { |
63 |
| - Closure<String> getProp = { String propName -> System.properties[propName] ?: |
64 |
| - project.gradle.startParameter.systemPropertiesArgs.get(propName) ?: |
65 |
| - hasProperty(propName) ? property(propName) : |
66 |
| - System.getenv(propName) ?: "" |
67 |
| - } |
68 |
| - imports { |
69 |
| - mavenBom "org.springframework.cloud:spring-cloud-dependencies:${getProp("BOM_VERSION") ?: "Edgware.BUILD-SNAPSHOT"}" |
70 |
| - } |
71 |
| - } |
72 |
| - |
73 |
| - wrapper { |
74 |
| - gradleVersion '4.6.0' |
75 |
| - } |
76 |
| - |
77 |
| - bootRun { |
78 |
| - jvmArgs = systemPropsFromGradle() |
79 |
| - } |
80 |
| - |
81 |
| - test { |
82 |
| - jvmArgs systemPropsFromGradle() |
83 |
| - testLogging { |
84 |
| - exceptionFormat = 'full' |
85 |
| - showStandardStreams = true |
86 |
| - } |
87 |
| - } |
| 26 | + apply plugin: 'java' |
| 27 | + apply plugin: 'eclipse' |
| 28 | + apply plugin: 'idea' |
| 29 | + apply plugin: 'org.springframework.boot' |
| 30 | + apply plugin: 'io.spring.dependency-management' |
| 31 | + |
| 32 | + ext { |
| 33 | + systemPropsFromGradle = { |
| 34 | + project.gradle.startParameter.systemPropertiesArgs.entrySet().collect { |
| 35 | + "-D${it.key}=${it.value}" |
| 36 | + } |
| 37 | + } |
| 38 | + buildNrLoc = project.hasProperty('buildNr') ? "${buildNr}" : "1.0.0.SLEUTH_DOCS" |
| 39 | + } |
| 40 | + |
| 41 | + group = 'io.spring.cloud.sleuth.docs' |
| 42 | + version = buildNrLoc |
| 43 | + sourceCompatibility = '1.8' |
| 44 | + |
| 45 | + repositories { |
| 46 | + mavenLocal() |
| 47 | + jcenter() |
| 48 | + maven { |
| 49 | + url "http://repo.spring.io/snapshot" |
| 50 | + } |
| 51 | + maven { |
| 52 | + url "http://repo.spring.io/milestone" |
| 53 | + } |
| 54 | + maven { |
| 55 | + url "http://repo.spring.io/libs-release-local" |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + dependencyManagement { |
| 60 | + Closure<String> getProp = { String propName -> |
| 61 | + System.properties[propName] ?: |
| 62 | + project.gradle.startParameter.systemPropertiesArgs.get(propName) ?: |
| 63 | + hasProperty(propName) ? property(propName) : |
| 64 | + System.getenv(propName) ?: "" |
| 65 | + } |
| 66 | + imports { |
| 67 | + mavenBom "org.springframework.cloud:spring-cloud-dependencies:${getProp("BOM_VERSION") ?: "Finchley.BUILD-SNAPSHOT"}" |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + wrapper { |
| 72 | + gradleVersion '4.6' |
| 73 | + } |
| 74 | + |
| 75 | + bootRun { |
| 76 | + jvmArgs = systemPropsFromGradle() |
| 77 | + } |
| 78 | + |
| 79 | + test { |
| 80 | + jvmArgs systemPropsFromGradle() |
| 81 | + testLogging { |
| 82 | + exceptionFormat = 'full' |
| 83 | + showStandardStreams = true |
| 84 | + } |
| 85 | + } |
88 | 86 |
|
89 | 87 | }
|
90 | 88 |
|
91 | 89 | configure(subprojects) {
|
92 |
| - task allDeps(type: DependencyReportTask) {} |
| 90 | + task allDeps(type: DependencyReportTask) {} |
93 | 91 | }
|
94 | 92 |
|
95 | 93 | configure(subprojects - project(':acceptance-tests')) {
|
96 | 94 |
|
97 |
| - dependencies { |
98 |
| - compile "org.springframework.boot:spring-boot-starter-web" |
99 |
| - compile "org.springframework.cloud:spring-cloud-starter-zipkin" |
100 |
| - compile "org.springframework.amqp:spring-rabbit" |
101 |
| - compile "org.springframework.boot:spring-boot-starter-actuator" |
102 |
| - compile "org.aspectj:aspectjrt" |
103 |
| - // for JSON logging |
104 |
| - runtime('net.logstash.logback:logstash-logback-encoder:4.6') { |
105 |
| - exclude group: "ch.qos.logback", module: "logback-core" |
106 |
| - } |
| 95 | + dependencies { |
| 96 | + compile "org.springframework.boot:spring-boot-starter-web" |
| 97 | + compile "org.springframework.cloud:spring-cloud-starter-zipkin" |
| 98 | + compile "org.springframework.amqp:spring-rabbit" |
| 99 | + compile "org.springframework.boot:spring-boot-starter-actuator" |
| 100 | + compile "org.aspectj:aspectjrt" |
| 101 | + // for JSON logging |
| 102 | + runtime('net.logstash.logback:logstash-logback-encoder:5.0') { |
| 103 | + exclude group: "ch.qos.logback", module: "logback-core" |
| 104 | + } |
107 | 105 |
|
108 |
| - runtime 'org.aspectj:aspectjweaver' |
109 |
| - } |
| 106 | + runtime 'org.aspectj:aspectjweaver' |
| 107 | + } |
110 | 108 |
|
111 | 109 | }
|
112 | 110 |
|
113 | 111 | configure(project(":acceptance-tests")) {
|
114 |
| - apply plugin: 'groovy' |
115 |
| - |
116 |
| - bootRepackage { |
117 |
| - enabled = false |
118 |
| - } |
119 |
| - |
120 |
| - bootRun { |
121 |
| - enabled = false |
122 |
| - } |
123 |
| - |
124 |
| - dependencies { |
125 |
| - compile "org.aspectj:aspectjrt:1.8.8" |
126 |
| - compile "org.springframework.boot:spring-boot-starter-web" |
127 |
| - compile 'org.codehaus.groovy:groovy-all' |
128 |
| - |
129 |
| - testCompile 'org.awaitility:awaitility:2.0.0' |
130 |
| - testCompile "org.springframework.boot:spring-boot-starter-test" |
131 |
| - testCompile "org.springframework:spring-web" |
132 |
| - testCompile "org.springframework.boot:spring-boot-starter-web" |
133 |
| - testCompile "org.springframework.cloud:spring-cloud-starter-sleuth" |
134 |
| - testCompile "io.zipkin.java:zipkin:1.0.0" |
135 |
| - testCompile( 'com.athaydes:spock-reports:1.2.13' ) { |
136 |
| - transitive = false // this avoids affecting your version of Groovy/Spock |
137 |
| - } |
138 |
| - testCompile "org.spockframework:spock-spring" |
139 |
| - } |
140 |
| - |
141 |
| - test { |
142 |
| - exclude '**/*.*' |
143 |
| - } |
144 |
| - |
145 |
| - task acceptanceTests(type: Test) { |
146 |
| - jvmArgs systemPropsFromGradle() |
147 |
| - testLogging { |
148 |
| - exceptionFormat = 'full' |
149 |
| - showStandardStreams = true |
150 |
| - } |
151 |
| - include '**/*.*' |
152 |
| - |
153 |
| - group = "Verification" |
154 |
| - description = "Runs the acceptance tests" |
155 |
| - } |
| 112 | + apply plugin: 'groovy' |
| 113 | + |
| 114 | + bootJar { |
| 115 | + enabled = false |
| 116 | + } |
| 117 | + jar { |
| 118 | + enabled = true |
| 119 | + } |
| 120 | + |
| 121 | + bootRun { |
| 122 | + enabled = false |
| 123 | + } |
| 124 | + |
| 125 | + dependencies { |
| 126 | + compile "org.aspectj:aspectjrt:1.8.8" |
| 127 | + compile "org.springframework.boot:spring-boot-starter-web" |
| 128 | + compile 'org.codehaus.groovy:groovy-all' |
| 129 | + |
| 130 | + testCompile 'org.awaitility:awaitility:2.0.0' |
| 131 | + testCompile "org.springframework.boot:spring-boot-starter-test" |
| 132 | + testCompile "org.springframework:spring-web" |
| 133 | + testCompile "org.springframework.boot:spring-boot-starter-web" |
| 134 | + testCompile "org.springframework.cloud:spring-cloud-starter-sleuth" |
| 135 | + testCompile "io.zipkin.java:zipkin:1.0.0" |
| 136 | + testCompile('com.athaydes:spock-reports:1.2.13') { |
| 137 | + transitive = false // this avoids affecting your version of Groovy/Spock |
| 138 | + } |
| 139 | + testCompile "org.spockframework:spock-spring:1.1-groovy-2.4" |
| 140 | + } |
| 141 | + |
| 142 | + test { |
| 143 | + exclude '**/*.*' |
| 144 | + } |
| 145 | + |
| 146 | + task acceptanceTests(type: Test) { |
| 147 | + jvmArgs systemPropsFromGradle() |
| 148 | + testLogging { |
| 149 | + exceptionFormat = 'full' |
| 150 | + showStandardStreams = true |
| 151 | + } |
| 152 | + include '**/*.*' |
| 153 | + |
| 154 | + group = "Verification" |
| 155 | + description = "Runs the acceptance tests" |
| 156 | + } |
156 | 157 |
|
157 | 158 | }
|
158 | 159 |
|
159 | 160 | String getProp(String propName) {
|
160 |
| - return System.properties[propName] ?: |
161 |
| - project.gradle.startParameter.systemPropertiesArgs.get(propName) ?: |
162 |
| - hasProperty(propName) ? property(propName) : |
163 |
| - System.getenv(propName) ?: "" |
| 161 | + return System.properties[propName] ?: |
| 162 | + project.gradle.startParameter.systemPropertiesArgs.get(propName) ?: |
| 163 | + hasProperty(propName) ? property(propName) : |
| 164 | + System.getenv(propName) ?: "" |
164 | 165 | }
|
0 commit comments