forked from hazelcast/hazelcast-scala
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
113 lines (94 loc) · 2.63 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.jfrog.bintray' version "1.7"
id 'scala'
id 'maven-publish'
}
ext {
vJUnit = '4.12'
vScalaTest = '3.0.0-RC4' //'2.2.6'
vScala = '2.11'
vScalaFull = "$vScala.8"
vHazelcast = '3.7.+'
vKryo = '3.0.+'
vObjenesis = '2.+'
vLz4 = '1.3.0'
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
if (version == '') {
version = 'SNAPSHOT'
}
if (version == 'SNAPSHOT') {
version = tsVersion(version)
}
def tsVersion(version) {
java.text.SimpleDateFormat tsFmt = new java.text.SimpleDateFormat('yyMMddHHmm')
tsFmt.setCalendar(Calendar.getInstance(TimeZone.getTimeZone('UTC')))
return "${version}-b${tsFmt.format(new Date())}"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly "org.scala-lang:scala-reflect:$vScalaFull"
compileOnly "com.hazelcast:hazelcast:$vHazelcast"
compileOnly "com.hazelcast:hazelcast-client:$vHazelcast"
compile "javax.cache:cache-api:1.0.0"
compile "javax.transaction:transaction-api:1.1"
compileOnly "com.esotericsoftware:kryo:$vKryo"
compileOnly "org.objenesis:objenesis:$vObjenesis"
compileOnly "net.jpountz.lz4:lz4:$vLz4"
testCompile "junit:junit:$vJUnit"
testCompile "org.scala-lang:scala-compiler:$vScalaFull"
testCompile "com.hazelcast:hazelcast:$vHazelcast"
testCompile "com.hazelcast:hazelcast-client:$vHazelcast"
testCompile "com.esotericsoftware:kryo:$vKryo"
testCompile "org.objenesis:objenesis:$vObjenesis"
testCompile "net.jpountz.lz4:lz4:$vLz4"
}
jar {
baseName = "${project.name}_$vScala"
manifest {
attributes "Implementation-Title": project.name, "Implementation-Version": version
}
}
task sourceJar(type: Jar) {
baseName "${project.name}_$vScala"
classifier "sources"
from sourceSets.main.allScala
}
task docsJar(type: Jar, dependsOn: scaladoc) {
baseName "${project.name}_$vScala"
classifier "docs"
from scaladoc.destinationDir
}
publishing {
publications {
maven(MavenPublication) {
groupId 'com.hazelcast'
artifactId jar.baseName
from components.java
artifact sourceJar
artifact docsJar
}
}
}
bintray {
user = System.properties.bintrayUser ?: "n/a"
key = System.properties.bintrayApiKey ?: "n/a"
dryRun = (user == "n/a" || key == "n/a" || version.startsWith('SNAPSHOT'))
publish = !dryRun
publications = ['maven']
pkg {
repo = System.properties.bintrayRepo
name = System.properties.bintrayName
}
}