-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
168 lines (139 loc) · 4.14 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: "signing"
apply plugin: "checkstyle"
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
group 'org.intermine'
version '3.1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile group: "org.intermine", name: "intermine-pathquery", version: System.getProperty("imVersion")
compile group: "org.intermine", name: "intermine-webapp", version: System.getProperty("imVersion")
compile group: "org.intermine", name: "intermine-model", version: System.getProperty("imVersion")
compile group: 'commons-codec', name: 'commons-codec', version: '1.9'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'org.json', name: 'json', version: '20131018'
compile group: 'commons-io', name: 'commons-io', version: '2.8.0'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
}
test {
ignoreFailures = true
// we have a system property that we need to get to the tests
systemProperties System.properties
testLogging {
events "skipped", "failed"
exceptionFormat "full"
showExceptions true
showStackTraces true
showCauses true
}
}
// see http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
checkstyle {
toolVersion '7.8.1'
configFile file("config/checkstyle/checkstyle.xml")
sourceSets = [sourceSets.main]
showViolations = true
ignoreFailures = false
maxWarnings = 0
//reportsDir = file("$project.rootDir/reports/checkstyle/$project.name")
configProperties = [
'checkstyle.header.file': "config/checkstyle/copyright_header.txt",
'suppressionFile': "config/checkstyle/suppressions.xml"
]
}
def excludePattern = 'build/generated-src/antlr/main/'
def excludePatternAntStyle = '**/' + excludePattern + '*'
checkstyleMain {
exclude excludePatternAntStyle
source = fileTree('src/main') {
includes = ['**/*.java']
excludes = ['build/**']
}
}
checkstyleTest {
enabled = false
}
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
}
signing {
required { gradle.taskGraph.hasTask("publish") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name project.name
packaging 'jar'
description 'InterMine Java Client'
url 'https://github.com/intermine/intermine'
scm {
connection 'scm:git:git://github.com/intermine/intermine-ws-java.git'
developerConnection 'scm:git:ssh://github.com:intermine/intermine-ws-java.git'
url 'https://github.com/intermine/intermine-ws-java.git'
}
licenses {
license {
name 'LGPL-2.1'
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}
developers {
developer {
name 'InterMine core team and contributors'
}
}
}
}
}
}
task generateInterMineJavadoc(type: Javadoc) {
group "InterMine"
description = "Generates javadoc in a different location"
source = sourceSets.main.java.srcDirs
classpath = sourceSets.main.runtimeClasspath
destinationDir = new File("$rootProject.projectDir/javadoc")
}