-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
126 lines (104 loc) · 3.99 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
114
115
116
117
118
119
120
121
122
123
124
125
126
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "com.jfrog.bintray" version "1.5"
}
group = 'org.bitsofinfo'
allprojects {
repositories {
jcenter()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
compile group: 'com.hazelcast', name: 'hazelcast', version:'[3.6,3.12]'
compile group: 'org.mousio', name: 'etcd4j', version:'2.9.0'
compile group: 'com.google.code.gson', name: 'gson', version:'2.4'
compile 'commons-io:commons-io:2.4'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.60'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60'
testCompile 'junit:junit:4.12'
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('bintrayUser')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('bintrayApiKey')
publications = ['hazelcastEtcdDiscoverySpi']
pkg {
repo = 'maven'
name = 'hazelcast-etcd-discovery-spi'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/bitsofinfo/hazelcast-etcd-discovery-spi'
publicDownloadNumbers = true
version {
name = project.property('version')
desc = project.property('version') + " : " + project.property('description')
released = new Date()
vcsTag = project.property('version')
}
}
}
publishing {
publications {
hazelcastEtcdDiscoverySpi(MavenPublication) {
from components.java
groupId project.property('group')
artifactId 'hazelcast-etcd-discovery-spi'
version project.property('version')
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().appendNode('name', project.property('group')+":hazelcast-etcd-discovery-spi")
asNode().appendNode('description', project.property('description'))
asNode().appendNode('url', "https://github.com/bitsofinfo/hazelcast-etcd-discovery-spi")
asNode().appendNode('packaging', "jar")
asNode().appendNode('licenses').appendNode('license')
.appendNode('name', "The Apache License, Version 2.0").parent()
.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt")
asNode().appendNode('developers').appendNode('developer')
.appendNode('id', "bitsofinfo").parent()
.appendNode('name', "bitsofinfo").parent()
.appendNode('email', "[email protected]").parent()
.appendNode('organization',"bitsofinfo").parent()
.appendNode('organizationUrl','https://github.com/bitsofinfo')
asNode().appendNode('scm')
.appendNode('connection', "scm:git:https://github.com/bitsofinfo/hazelcast-etcd-discovery-spi.git").parent()
.appendNode('developerConnection', "scm:git:https://github.com/bitsofinfo/hazelcast-etcd-discovery-spi.git").parent()
.appendNode('url', "https://github.com/bitsofinfo/hazelcast-etcd-discovery-spi")
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: 'javadoc') {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
task runTests(type: Test) {
description 'Runs unit tests for all tests except TestDoNothingRegistrator.'
//Always run tests even when up-to-date
outputs.upToDateWhen {
false
}
//Exclude TestDoNothingRegistrator test because it requires special setup
exclude "**/TestDoNothingRegistrator.class"
}
runTests {
testLogging {
// Show that tests are run in the command-line output
events 'started', 'passed'
}
}