@@ -67,16 +67,68 @@ subprojects {
67
67
}
68
68
}
69
69
70
+ jar {
71
+ from ' ../LICENSE'
72
+ from ' ../NOTICE'
73
+ }
74
+
75
+ tasks. withType(Javadoc ) {
76
+ task srcJar(type :Jar ) {
77
+ classifier = ' sources'
78
+ from ' ../LICENSE'
79
+ from ' ../NOTICE'
80
+ from sourceSets. main. java
81
+ }
82
+
83
+ task javadocJar(type : Jar , dependsOn : javadoc) {
84
+ classifier ' javadoc'
85
+ from ' ../LICENSE'
86
+ from ' ../NOTICE'
87
+ from javadoc. destinationDir
88
+ }
89
+
90
+ task docsJar(type : Jar , dependsOn : javadocJar) { }
91
+
92
+ artifacts {
93
+ archives srcJar
94
+ archives javadocJar
95
+ }
96
+ }
97
+
70
98
tasks. withType(ScalaCompile ) {
99
+ task srcJar(type :Jar , overwrite : true ) {
100
+ classifier = ' sources'
101
+ from ' ../LICENSE'
102
+ from ' ../NOTICE'
103
+ from sourceSets. main. scala
104
+ from sourceSets. main. java
105
+ }
106
+
71
107
scalaCompileOptions. useAnt = false
108
+
72
109
configure(scalaCompileOptions. forkOptions) {
73
110
memoryMaximumSize = ' 1g'
74
111
jvmArgs = [' -XX:MaxPermSize=512m' ]
75
112
}
76
113
}
114
+
115
+ tasks. withType(ScalaDoc ) {
116
+ task scaladocJar(type :Jar ) {
117
+ classifier = ' scaladoc'
118
+ from ' ../LICENSE'
119
+ from ' ../NOTICE'
120
+ from scaladoc
121
+ }
122
+
123
+ task docsJar(type : Jar , dependsOn : [' javadocJar' , ' scaladocJar' ], overwrite : true ) { }
124
+
125
+ artifacts {
126
+ archives scaladocJar
127
+ }
128
+ }
77
129
}
78
130
79
- for ( sv in [' 2_8_0' , ' 2_8_2 ' , ' 2_9_1' , ' 2_9_2' , ' 2_10_1' ] ) {
131
+ for ( sv in [' 2_8_0' , ' 2_9_1' , ' 2_9_2' , ' 2_10_1' ] ) {
80
132
String svInDot = sv. replaceAll( " _" , " ." )
81
133
82
134
tasks. create(name : " jar_core_${ sv} " , type : GradleBuild ) {
@@ -91,6 +143,18 @@ for ( sv in ['2_8_0', '2_8_2', '2_9_1', '2_9_2', '2_10_1'] ) {
91
143
startParameter. projectProperties = [scalaVersion : " ${ svInDot} " ]
92
144
}
93
145
146
+ tasks. create(name : " srcJar_${ sv} " , type : GradleBuild ) {
147
+ buildFile = ' ./build.gradle'
148
+ tasks = [' core:srcJar' ]
149
+ startParameter. projectProperties = [scalaVersion : " ${ svInDot} " ]
150
+ }
151
+
152
+ tasks. create(name : " docsJar_${ sv} " , type : GradleBuild ) {
153
+ buildFile = ' ./build.gradle'
154
+ tasks = [' core:docsJar' ]
155
+ startParameter. projectProperties = [scalaVersion : " ${ svInDot} " ]
156
+ }
157
+
94
158
tasks. create(name : " releaseTarGz_${ sv} " , type : GradleBuild ) {
95
159
buildFile = ' ./build.gradle'
96
160
tasks = [' releaseTarGz' ]
@@ -104,16 +168,20 @@ for ( sv in ['2_8_0', '2_8_2', '2_9_1', '2_9_2', '2_10_1'] ) {
104
168
}
105
169
}
106
170
107
- tasks. create(name : " jarAll" , dependsOn : [' jar_core_2_8_0' , ' jar_core_2_8_2 ' , ' jar_core_2_9_1' , ' jar_core_2_9_2' , ' jar_core_2_10_1' , ' clients:jar' , ' perf:jar' , ' examples:jar' , ' contrib:hadoop-consumer:jar' , ' contrib:hadoop-producer:jar' ]) {
171
+ tasks. create(name : " jarAll" , dependsOn : [' jar_core_2_8_0' , ' jar_core_2_9_1' , ' jar_core_2_9_2' , ' jar_core_2_10_1' , ' clients:jar' , ' perf:jar' , ' examples:jar' , ' contrib:hadoop-consumer:jar' , ' contrib:hadoop-producer:jar' ]) {
108
172
}
109
173
110
- tasks. create(name : " testAll" , dependsOn : [' test_core_2_8_0' , ' test_core_2_8_2' , ' test_core_2_9_1' , ' test_core_2_9_2' , ' test_core_2_10_1' , ' clients:test' ]) {
174
+ tasks. create(name : " srcJarAll" , dependsOn : [' srcJar_2_8_0' , ' srcJar_2_9_1' , ' srcJar_2_9_2' , ' srcJar_2_10_1' , ' clients:srcJar' , ' perf:srcJar' , ' examples:srcJar' , ' contrib:hadoop-consumer:srcJar' , ' contrib:hadoop-producer:srcJar' ]) { }
175
+
176
+ tasks. create(name : " docsJarAll" , dependsOn : [' docsJar_2_8_0' , ' docsJar_2_9_1' , ' docsJar_2_9_2' , ' docsJar_2_10_1' , ' clients:docsJar' , ' perf:docsJar' , ' examples:docsJar' , ' contrib:hadoop-consumer:docsJar' , ' contrib:hadoop-producer:docsJar' ]) { }
177
+
178
+ tasks. create(name : " testAll" , dependsOn : [' test_core_2_8_0' , ' test_core_2_9_1' , ' test_core_2_9_2' , ' test_core_2_10_1' , ' clients:test' ]) {
111
179
}
112
180
113
- tasks. create(name : " releaseTarGzAll" , dependsOn : [' releaseTarGz_2_8_0' , ' releaseTarGz_2_8_2 ' , ' releaseTarGz_2_9_1' , ' releaseTarGz_2_9_2' , ' releaseTarGz_2_10_1' ]) {
181
+ tasks. create(name : " releaseTarGzAll" , dependsOn : [' releaseTarGz_2_8_0' , ' releaseTarGz_2_9_1' , ' releaseTarGz_2_9_2' , ' releaseTarGz_2_10_1' ]) {
114
182
}
115
183
116
- tasks. create(name : " uploadArchivesAll" , dependsOn : [' uploadCoreArchives_2_8_0' , ' uploadCoreArchives_2_8_2 ' , ' uploadCoreArchives_2_9_1' , ' uploadCoreArchives_2_9_2' , ' uploadCoreArchives_2_10_1' , ' perf:uploadArchives' , ' examples:uploadArchives' , ' contrib:hadoop-consumer:uploadArchives' , ' contrib:hadoop-producer:uploadArchives' ]) {
184
+ tasks. create(name : " uploadArchivesAll" , dependsOn : [' uploadCoreArchives_2_8_0' , ' uploadCoreArchives_2_9_1' , ' uploadCoreArchives_2_9_2' , ' uploadCoreArchives_2_10_1' , ' perf:uploadArchives' , ' examples:uploadArchives' , ' contrib:hadoop-consumer:uploadArchives' , ' contrib:hadoop-producer:uploadArchives' ]) {
117
185
}
118
186
119
187
project(' :core' ) {
@@ -189,11 +257,9 @@ project(':core') {
189
257
from(configurations. runtime) { into(" libs/" ) }
190
258
from(configurations. archives. artifacts. files) { into(" libs/" ) }
191
259
}
192
-
260
+
193
261
jar {
194
262
dependsOn ' copyDependantLibs'
195
- from ' ../LICENSE'
196
- from ' ../NOTICE'
197
263
}
198
264
199
265
task testJar(type : Jar ) {
@@ -207,6 +273,7 @@ project(':core') {
207
273
exceptionFormat = ' full'
208
274
}
209
275
}
276
+
210
277
}
211
278
212
279
project(' :perf' ) {
@@ -222,11 +289,6 @@ project(':perf') {
222
289
223
290
zinc ' com.typesafe.zinc:zinc:0.2.5'
224
291
}
225
-
226
- jar {
227
- from ' ../LICENSE'
228
- from ' ../NOTICE'
229
- }
230
292
}
231
293
232
294
project(' :contrib:hadoop-consumer' ) {
@@ -252,11 +314,6 @@ project(':contrib:hadoop-consumer') {
252
314
compile. exclude module : ' mail'
253
315
compile. exclude module : ' netty'
254
316
}
255
-
256
- jar {
257
- from ' ../LICENSE'
258
- from ' ../NOTICE'
259
- }
260
317
}
261
318
262
319
project(' :contrib:hadoop-producer' ) {
@@ -282,11 +339,6 @@ project(':contrib:hadoop-producer') {
282
339
compile. exclude module : ' mail'
283
340
compile. exclude module : ' netty'
284
341
}
285
-
286
- jar {
287
- from ' ../LICENSE'
288
- from ' ../NOTICE'
289
- }
290
342
}
291
343
292
344
project(' :examples' ) {
@@ -296,10 +348,6 @@ project(':examples') {
296
348
compile project(' :core' )
297
349
}
298
350
299
- jar {
300
- from ' ../LICENSE'
301
- from ' ../NOTICE'
302
- }
303
351
}
304
352
305
353
project(' :clients' ) {
@@ -309,11 +357,6 @@ project(':clients') {
309
357
testCompile ' com.novocode:junit-interface:0.9'
310
358
}
311
359
312
- jar {
313
- from ' ../LICENSE'
314
- from ' ../NOTICE'
315
- }
316
-
317
360
task testJar(type : Jar ) {
318
361
appendix = ' test'
319
362
from sourceSets. test. output
0 commit comments