forked from real-logic/agrona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
148 lines (124 loc) · 4.45 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
/*
* Copyright 2014 Real Logic Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'checkstyle'
apply plugin: 'eclipse'
defaultTasks 'clean', 'build', 'install'
group = 'uk.co.real-logic'
version = '1.0-SNAPSHOT'
ext {
if (!project.hasProperty('ossrhUsername'))
ossrhUsername = ''
if (!project.hasProperty('ossrhPassword'))
ossrhPassword = ''
}
repositories {
mavenCentral()
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
compileJava {
// Suppress warnings about using Unsafe and sun.misc
options.compilerArgs << '-XDignore.symbol.file'
options.fork = true
options.forkOptions.executable = 'javac'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
dependencies {
testCompile 'org.hamcrest:hamcrest-all:1.3', 'junit:junit:4.11', 'org.mockito:mockito-all:1.9.5'
}
checkstyle {
configFile = new File(rootDir, 'config/checkstyle/checkstyle.xml')
toolVersion = 5.9
}
javadoc {
title = '<h1>Agrona</h1>'
options.bottom = '<i>Copyright © 2014 Real Logic Ltd. All Rights Reserved.</i>'
options.addStringOption('XDignore.symbol.file', '-quiet')
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
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 = 'Agrona'
packaging = 'pom'
// optionally artifactId can be defined here
description = 'High performance primitives and utility library.'
url = 'https://github.com/real-logic/Agrona'
scm {
connection = 'scm:git:https://github.com/real-logic/Agrona.git'
developerConnection = 'scm:git:https://github.com/real-logic/Agrona.git'
url = 'https://github.com/real-logic/Agrona.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'tmontgomery'
name = 'Todd L. Montgomery'
email = '[email protected]'
url = 'https://github.com/tmontgomery'
}
developer {
id = 'mjpt777'
name = 'Martin Thompson'
email = '[email protected]'
url = 'https://github.com/mjpt777'
}
developer {
id = 'RichardWarburton'
name = 'Richard Warburton'
email = '[email protected]'
url = 'https://github.com/RichardWarburton'
}
developer {
id = 'SimulatedSimian'
name = 'Lee Witek'
email = '[email protected]'
url = 'https://github.com/SimulatedSimian'
}
}
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}