-
Notifications
You must be signed in to change notification settings - Fork 351
/
build.gradle
211 lines (178 loc) · 6.67 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath group: 'org.intermine', name: 'plugin', version: System.getProperty("imVersion")
}
}
ext {
// set here to make available to individual bio-sources
bioVersion = System.getProperty("bioVersion")
imVersion = System.getProperty("imVersion")
}
subprojects {
group = 'org.intermine'
version = '5.0.3'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'dbmodel'
apply plugin: 'biosource-dbmodel'
apply plugin: "checkstyle"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/'
}
}
configurations {
bioModel
mergeModel
}
dependencies {
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.intermine', name: 'bio-core', version: System.getProperty("bioVersion"), transitive: false
compile group : "org.intermine", name: "intermine-resources", version: System.getProperty("imVersion") // log4j
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile group: "org.intermine", name: "intermine-integrate", version: System.getProperty("imVersion"), classifier: "testClasses"
testCompile group: 'xmlunit', name: 'xmlunit', version: '1.0'
mergeModel group : "org.intermine", name: "intermine-objectstore", version: System.getProperty("imVersion")
// JAX-B dependencies for JDK 9+
implementation "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
implementation "javax.annotation:javax.annotation-api:1.3.2"
}
dbModelConfig {
objectStoreName = "os.bio-test"
modelName = "genomic"
defaultInterminePropertiesFile = "default.intermine.bio-test.properties"
}
task copyMineProperties() {
dependsOn 'processResources'
doLast {
copy {
from "${System.env.HOME}/.intermine/intermine-bio-test.properties"
into sourceSets.main.output.resourcesDir
rename { fileName -> fileName.replace('intermine-bio-test.properties', 'intermine.properties') }
}
}
}
jar {
exclude "intermine.properties"
}
// see http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
if (it.name != 'bio-source-malaria-gff') {
checkstyle {
toolVersion '7.8.1'
configFile file("${rootDir}/../../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': "${rootDir}/../../config/checkstyle/copyright_header.txt",
'suppressionFile': "${rootDir}/../../config/checkstyle/suppressions.xml"
]
}
}
if (it.name == 'bio-source-malaria-gff') {
checkstyle {
toolVersion '7.8.1'
configFile file("${rootDir}/../../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': "${rootDir}/../../config/checkstyle/copyright_header.txt",
'suppressionFile': "${rootDir}/../../config/checkstyle/suppressions.xml"
]
}
}
checkstyleMain {
source = fileTree('src/main') {
includes = ['**/*.java']
excludes = ['build/**']
}
}
checkstyleTest {
enabled = false
}
tasks.withType(Test) {
scanForTestClasses = false
include '**/*Test.class'
}
test {
systemProperties System.properties
ignoreFailures = true
forkEvery = 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 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 bio sources modules'
url 'https://github.com/intermine/intermine'
scm {
connection 'scm:git:git://github.com/intermine/intermine.git'
developerConnection 'scm:git:ssh://github.com:intermine/intermine.git'
url 'https://github.com/intermine/intermine'
}
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'
}
}
}
}
}
}
tasks.compileTestJava.dependsOn 'copyMineProperties'
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}