-
Notifications
You must be signed in to change notification settings - Fork 351
/
build.gradle
138 lines (117 loc) · 4.23 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath group: 'org.intermine', name: 'plugin', version: System.getProperty("imVersion")
}
}
ext {
// set here to make available to individual bio-postprocesses
bioVersion = System.getProperty("bioVersion")
imVersion = System.getProperty("imVersion")
flymineVersion = System.getProperty("flymineVersion")
}
subprojects {
group = 'org.intermine'
version = '5.0.5'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'dbmodel'
apply plugin: 'biocore-dbmodel'
apply plugin: "checkstyle"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()//temporary for bio-source-flymine-static
}
configurations {
mergeModel
}
dependencies {
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")
testCompile group: 'xmlunit', name: 'xmlunit', version: '1.0'
mergeModel group : "org.intermine", name: "intermine-objectstore", version: System.getProperty("imVersion")
compile group: 'org.intermine', name: 'bio-postprocess-create-chromosome-locations-and-lengths', version: bioVersion
testCompile group: 'org.intermine', name: 'bio-postprocess-create-chromosome-locations-and-lengths', version: bioVersion
}
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')
}
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 {
// we have a system property that we need to get to the tests
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
}
tasks.compileTestJava.dependsOn 'copyMineProperties', 'buildUnitTestDB'
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}