4
4
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5
5
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
6
6
*/
7
+ plugins {
8
+ id " com.jfrog.bintray" version " 1.3.1"
9
+ }
10
+
7
11
apply plugin : ' base'
8
12
apply plugin : ' idea'
9
13
apply plugin : ' distribution'
@@ -223,7 +227,7 @@ task buildBundles(type: Task, dependsOn: [distZip,distTar]) {
223
227
description = " Builds all release bundles"
224
228
}
225
229
226
- task uploadBundles (type : Exec , dependsOn : buildBundles) {
230
+ task uploadBundlesSourceForge (type : Exec , dependsOn : buildBundles) {
227
231
description = " Uploads release bundles to SourceForge"
228
232
229
233
final String url = " frs.sourceforge.net:/home/frs/project/hibernate/hibernate-orm/${ version} " ;
@@ -246,6 +250,60 @@ task uploadBundles(type: Exec, dependsOn: buildBundles) {
246
250
}
247
251
}
248
252
253
+ String binTrayUser = null
254
+ String binTrayApiKey = null
255
+
256
+ if ( project. hasProperty( " BINTRAY_USER" ) ) {
257
+ binTrayUser = project. property( " BINTRAY_USER" ) as String ;
258
+ }
259
+ if ( binTrayUser == null ) {
260
+ binTrayUser = System . getProperty( " BINTRAY_USER" );
261
+ }
262
+ if ( binTrayUser == null ) {
263
+ binTrayUser = System . getenv( " BINTRAY_USER" );
264
+ }
265
+ if ( binTrayUser == null ) {
266
+ binTrayUser = ' UNDEFINED'
267
+ }
268
+
269
+ if ( project. hasProperty( " BINTRAY_APIKEY" ) ) {
270
+ binTrayApiKey = project. property( " BINTRAY_APIKEY" ) as String ;
271
+ }
272
+ if ( binTrayApiKey == null ) {
273
+ binTrayApiKey = System . getProperty( " BINTRAY_APIKEY" );
274
+ }
275
+ if ( binTrayApiKey == null ) {
276
+ binTrayApiKey = System . getenv( " BINTRAY_APIKEY" );
277
+ }
278
+ if ( binTrayApiKey == null ) {
279
+ binTrayApiKey = ' UNDEFINED'
280
+ }
281
+
282
+
283
+ bintray {
284
+ user = binTrayUser
285
+ key = binTrayApiKey
286
+
287
+ publish = true
288
+
289
+ filesSpec {
290
+ from " $buildDir /distributions"
291
+ into ' /'
292
+ }
293
+
294
+ pkg {
295
+ userOrg = ' hibernate'
296
+ repo = ' bundles'
297
+ name = ' hibernate-orm'
298
+ }
299
+ }
300
+
301
+ bintrayUpload. dependsOn buildBundles
302
+
303
+ task uploadBundles (dependsOn : [bintrayUpload, uploadBundlesSourceForge]) {
304
+ description = ' Performs all release bundle uploads'
305
+ }
306
+
249
307
250
308
// Full release related tasks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251
309
0 commit comments