-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
245 lines (202 loc) · 6.17 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
// ORG.CHRONOS/build.gradle --- TOP LEVEL GRADLE FILE ---
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven {
// Apache Gremlin snapshots
url "https://repository.apache.org/content/groups/snapshots"
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'signing'
// configure the group and version for this project
group = 'com.github.martinhaeusler'
version = '0.9.1'
// java version
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
jar {
manifest {
attributes 'Implementation-Version': version
}
}
test {
exclude '**/_suite/**'
testLogging {
exceptionFormat = 'full'
}
}
javadoc{
failOnError = false
}
// dependency versions
ext {
// build specific attributes
isJenkins = System.getenv('JENKINS_URL') != null
buildNumber = System.getenv("BUILD_NUMBER") ?: "LOCAL_BUILD"
buildTimestamp = new Date().format('yyyy-MM-dd HH:mm:ss')
buildVersion = project.version
// git specific attributes
gitBranch = project.isJenkins ? System.getenv("BRANCH_NAME") : "NO_BRANCH"
// maven specific attributes for publishing
mavenVersion = "${project.buildVersion}"
// standard libraries
guavaVersion = '19.0' // was 18.0
commonsLang3Version = '3.4'
commonsCollectionsVersion = '4.1'
commonsIoVersion = '2.4'
commonsConfigurationVersion = '1.10'
// Logging
slf4jVersion = '1.7.12'
logbackVersion = '1.1.3'
// Apache Tinkerpop
tinkerpopVersion = '3.3.0'
tinkergraphVersion = '3.0.0.M7'
// Storage Backends
mapDBVersion = '2.0-beta13' // was 2.0-beta11, was 2.0-beta6, was 1.0.8
luceneVersion = '5.5.0' // was 5.3.1
h2Version = '1.4.187'
tuplVersion = '1.3.11' // was '1.3.4.0'
// Additional JDBC resources
c3p0Version = '0.9.5.1'
// Object Serialization
kryoVersion = '3.0.3' // was 2.24.0
xstreamVersion = '1.4.9'
// Testing
jUnitVersion = '4.12'
hamcrestVersion = '1.3'
// code coverage & quality assurance tools
jacocoVersion = '0.7.6.201602180812' // was '0.7.1.201405082137'
findbugsVersion = '3.0.0'
}
repositories {
// default repositories for all subprojects
mavenCentral()
// Apache Gremlin snapshots
maven {
url "https://repository.apache.org/content/groups/snapshots"
}
}
dependencies {
// Standard Library Dependencies
compile("com.google.guava:guava:${project.guavaVersion}")
compile("org.apache.commons:commons-lang3:${project.commonsLang3Version}")
compile("org.apache.commons:commons-collections4:${project.commonsCollectionsVersion}")
compile("commons-io:commons-io:${project.commonsIoVersion}")
compile("commons-configuration:commons-configuration:${project.commonsConfigurationVersion}")
// Logging Dependencies
compile("org.slf4j:slf4j-api:${project.slf4jVersion}")
compile("org.slf4j:jcl-over-slf4j:${project.slf4jVersion}")
compile("org.slf4j:jul-to-slf4j:${project.slf4jVersion}")
compile("ch.qos.logback:logback-classic:${project.logbackVersion}")
// Testing Dependencies
testCompile("junit:junit:${project.jUnitVersion}")
testCompile("org.hamcrest:hamcrest-all:${project.hamcrestVersion}")
}
jacoco {
toolVersion = "${project.jacocoVersion}"
}
jacocoTestReport {
reports {
xml {
enabled true // coveralls plugin depends on xml format report
}
html {
enabled true
}
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
// exclude exception packages from code coverage
'**/exceptions/**',
// exclude benchmark packages from code coverage
'**/benchmarks/**'
])
})
}
}
jar { manifest.attributes provider: 'chronos.org' }
findbugs {
toolVersion = project.findbugsVersion
ignoreFailures = true
reportsDir = file("$project.buildDir/findbugsReports")
effort = 'max'
omitVisitors = ['SerializableIdiom']
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
/* signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Chronos'
packaging 'jar'
// optionally artifactId can be defined here
description 'Versioned data storage, embeddable and easy to use.'
url 'https://github.com/MartinHaeusler/chronos'
scm {
connection 'scm:git:https://github.com/MartinHaeusler/chronos'
developerConnection 'scm:git:https://github.com/MartinHaeusler/chronos'
url 'https://github.com/MartinHaeusler/chronos'
}
licenses {
license {
name 'GNU Affero General Public License v3'
url 'https://www.gnu.org/licenses/agpl-3.0.txt'
}
}
developers {
developer {
id 'martin.haeusler'
name 'Martin Häusler'
email '[email protected]'
}
}
}
}
}
}*/
}
test.dependsOn = subprojects.test
clean.dependsOn = subprojects.clean
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}