forked from Netflix/curator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
199 lines (172 loc) · 6.04 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
// Establish version and status
def performingRelease = project.hasProperty('release') && Boolean.parseBoolean(project.release)
def releaseVersion = '1.1.6'
def versionPostfix = performingRelease?'':'-SNAPSHOT'
version = "${releaseVersion}${versionPostfix}"
status = performingRelease?'release':'snapshot'
apply plugin: 'idea'
subprojects
{
apply plugin: 'java'
apply plugin: 'idea'
group = 'com.netflix.curator'
version = rootProject.version
sourceCompatibility = 1.6
tasks.test.useTestNG()
// GRADLE-2087 workaround, perform after java plugin
status = rootProject.status
repositories
{
mavenCentral()
maven
{
url "https://repository.jboss.org/nexus/content/groups/public/"
}
}
dependencies
{
compile('org.apache.zookeeper:zookeeper:3.4.2')
{
exclude group: 'com.sun.jmx', module: 'jmxri'
exclude group: 'com.sun.jdmk', module: 'jmxtools'
exclude group: 'javax.jms', module: 'jms'
// JLine pulls this in as a compile dependency, they have fixed it in future versions
exclude group: 'junit', module: 'junit'
}
compile 'com.google.guava:guava:11.0.1'
compile 'org.testng:testng:6.1.1'
}
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 jar
archives sourcesJar
archives javadocJar
}
// Maven side of things
apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope mappings to work
apply plugin: 'signing'
signing {
required performingRelease
sign configurations.archives
}
/**
* Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
*/
task uploadMavenCentral(type:Upload) {
configuration = configurations.archives
dependsOn signArchives
doFirst {
repositories.mavenDeployer {
beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }
// To test deployment locally, use the following instead of oss.sonatype.org
//repository(url: "file://localhost/${rootProject.rootDir}/repo")
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
authentication(userName: rootProject.sonatypeUsername, password: rootProject.sonatypePassword)
}
// Prevent datastamp from being appending to artifacts during deployment
uniqueVersion = false
// Closure to configure all the POM with extra info, common to all projects
pom.project {
parent {
groupId 'org.sonatype.oss'
artifactId 'oss-parent'
version '7'
}
url 'https://github.com/Netflix/curator'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection 'scm:git:[email protected]:Netflix/curator.git'
url 'scm:git:[email protected]:Netflix/curator.git'
developerConnection 'scm:git:[email protected]:Netflix/curator.git'
}
issueManagement {
system 'github'
url 'https://github.com/Netflix/curator/issues'
}
}
}
}
}
}
task aggregateJavadoc(type: Javadoc) {
description = 'Aggregate all subproject docs into a single docs directory'
source subprojects.collect {project -> project.sourceSets.main.allJava }
classpath = files(subprojects.collect {project -> project.sourceSets.main.compileClasspath})
destinationDir = new File(projectDir, 'doc')
}
project(':curator-client')
{
dependencies
{
compile 'org.slf4j:slf4j-api:1.6.3'
// Original has commons-logging
testCompile 'org.mockito:mockito-core:1.8.5'
testCompile project(':curator-test')
}
}
project(':curator-test')
{
dependencies
{
compile 'org.javassist:javassist:3.15.0-GA'
compile 'org.apache.commons:commons-math:2.2'
}
}
project(':curator-framework')
{
dependencies
{
compile project(':curator-client')
testCompile project(':curator-test')
}
}
project(':curator-recipes')
{
dependencies
{
compile project(':curator-framework')
testCompile 'org.mockito:mockito-core:1.8.5'
testCompile project(':curator-test')
}
}
project(':curator-x-discovery')
{
dependencies
{
compile project(':curator-framework')
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.2'
testCompile project(':curator-test')
}
}
project(':curator-x-discovery-server')
{
dependencies
{
compile project(':curator-x-discovery')
compile 'javax.ws.rs:jsr311-api:1.1.1'
testCompile 'junit:junit-dep:4.10'
testCompile 'com.sun.jersey:jersey-server:1.11'
testCompile 'com.sun.jersey:jersey-servlet:1.11'
testCompile 'com.sun.jersey:jersey-client:1.11'
testCompile 'com.sun.jersey:jersey-core:1.11'
testCompile 'org.jboss.resteasy:resteasy-jaxrs:2.3.0.GA'
testCompile 'org.mortbay.jetty:jetty:6.1.22'
}
}
// Generate wrapper, which is distributed as part of source to alleviate the need of installing gradle
task createWrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-8a'
}