forked from BimberLab/DiscvrLabKeyModules
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
215 lines (197 loc) · 9.44 KB
/
build.gradle
File metadata and controls
215 lines (197 loc) · 9.44 KB
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
import org.labkey.gradle.plugin.TeamCity
import org.labkey.gradle.plugin.extension.ServerDeployExtension
import org.labkey.gradle.plugin.extension.TeamCityExtension
import org.labkey.gradle.task.DoThenSetup
import org.labkey.gradle.util.BuildUtils
import org.labkey.gradle.util.GroupNames
import org.labkey.gradle.util.PropertiesUtils
import org.labkey.gradle.util.ExternalDependency
import java.util.regex.Matcher
//repositories {
// mavenCentral()
// maven {
// url "https://maven.scijava.org/content/groups/public/"
// content {
// includeGroup "cisd" //jhdf5
// }
// }
//}
configurations.all {
resolutionStrategy {
force "org.glassfish.jaxb:jaxb-runtime:${jaxbVersion}"
}
}
dependencies {
apiImplementation "com.github.samtools:htsjdk:${htsjdkVersion}"
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"com.github.samtools:htsjdk:${htsjdkVersion}",
'htsjdk',
'htsjdk',
'http://samtools.github.io/htsjdk/',
ExternalDependency.MIT_LICENSE_NAME,
ExternalDependency.MIT_LICENSE_URL,
'A Java API for high-throughput sequencing data (HTS) formats'
)
)
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "apiJarFile")
BuildUtils.addLabKeyDependency(project: project, config: "apiImplementation", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "apiJarFile")
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
BuildUtils.addLabKeyDependency(project: project, config: "apiImplementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
'org.biojava:biojava-core:7.1.1',
'biojava-core',
'biojava',
'http://biojava.org/wiki/Main_Page',
ExternalDependency.GNU_LESSER_GPL_21_NAME,
ExternalDependency.GNU_LESSER_GPL_21_URL,
'Java framework for processing biological data'
),
{
// Exclude in favor of angus activation from API
exclude group: 'org.eclipse.angus', module: 'angus-activation'
exclude group: "jakarta.activation", module: "jakarta.activation-api"
}
)
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
'org.biojava:biojava-genome:7.1.1',
'biojava-genome',
'biojava',
'http://biojava.org/wiki/Main_Page',
ExternalDependency.GNU_LESSER_GPL_21_NAME,
ExternalDependency.GNU_LESSER_GPL_21_URL,
'Java framework for processing biological data'
),
{
// Exclude in favor of angus activation from API
exclude group: 'org.eclipse.angus', module: 'angus-activation'
exclude group: "jakarta.activation", module: "jakarta.activation-api"
}
)
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
'org.itadaki:bzip2:0.9.1',
'jbzip2',
'jbzip2',
'http://code.google.com/p/jbzip2/',
ExternalDependency.MIT_LICENSE_NAME,
ExternalDependency.MIT_LICENSE_URL,
'BZIP compression/decompression library. Used by FastQC'
)
)
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
'cisd:jhdf5:19.04.1',
'JHDF5',
'JHDF5',
'https://unlimited.ethz.ch/display/JHDF/',
ExternalDependency.BSD_LICENSE_NAME,
ExternalDependency.BSD_LICENSE_URL,
'JHDF5 is a Java binding for HDF5. Used by FastQC'
)
)
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
'net.iharder:base64:2.3.8',
'Base64',
'Base64',
'http://iharder.net/base64/',
ExternalDependency.MIT_LICENSE_NAME,
ExternalDependency.MIT_LICENSE_URL,
'Library for Base64 encoding. Used by FastQC'
)
)
implementation "net.sf.opencsv:opencsv:${opencsvVersion}"
// picard brings in a version of servlet-api and a very old one at that, so we excluded it
// Note: if changing this, we might need to match the htsjdk version set in gradle.properties
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"com.github.broadinstitute:picard:3.1.0",
"Picard Tools Lib",
"PicardTools",
"https://github.com/broadinstitute/picard",
ExternalDependency.APACHE_2_LICENSE_NAME,
ExternalDependency.APACHE_2_LICENSE_URL,
"Manipulating Sequence Data"
),
{
exclude group: "javax.servlet", module: "servlet-api"
exclude group: "org.apache.commons", module: "commons-collections4"
// NOTE: this is a dependency of picard->google-cloud-storage. there is a vunerability in 1.6.8 that does not seem fixed as of 1.6.9
exclude group: "org.threeten", module: "threetenbp"
}
)
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"org.apache.commons:commons-math3:${commonsMath3Version}",
"Commons Math",
"Apache",
"http://commons.apache.org/math/",
ExternalDependency.APACHE_2_LICENSE_NAME,
ExternalDependency.APACHE_2_LICENSE_URL,
"Lightweight, self-contained mathematics and statistics components"
)
)
apiImplementation "org.apache.commons:commons-math3:${commonsMath3Version}"
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "published", depExtension: "module")
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "published", depExtension: "module")
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:DiscvrLabKeyModules:discvrcore", depProjectConfig: "published", depExtension: "module")
}
if (project.findProject(BuildUtils.getTestProjectPath(project.gradle)) != null && project.hasProperty("teamcity"))
{
project.evaluationDependsOn(BuildUtils.getTestProjectPath(project.gradle))
def configDir = new File(ServerDeployExtension.getServerDeployDirectory(project), "config")
def testProject = project.findProject(BuildUtils.getTestProjectPath(project.gradle))
def createPipelineConfigTask = project.tasks.register("createPipelineConfig", Copy) {
Copy task ->
task.group = GroupNames.TEST_SERVER
task.description = "Create pipeline configs for running tests on the test server"
task.from project.file("test/configs")
task.include "pipelineConfig.xml"
task.filter({ String line ->
Matcher matcher = PropertiesUtils.PROPERTY_PATTERN.matcher(line)
def extension = testProject.extensions.findByType(TeamCityExtension.class)
String newLine = line
while (matcher.find())
{
if (matcher.group(1).equals("SEQUENCEANALYSIS_TOOLS"))
newLine = newLine.replace(matcher.group(), extension.getTeamCityProperty("additional.pipeline.tools"))
}
return newLine
})
task.destinationDir = configDir
rootProject.allprojects {
task.mustRunAfter tasks.withType(DoThenSetup)
}
}
testProject.tasks.named("startTomcat").configure {
dependsOn(createPipelineConfigTask)
it.doFirst {
new File(new File(BuildUtils.getEmbeddedConfigPath(project)), "application.properties")
<< "\ncontext.pipelineConfig=${configDir.getAbsolutePath().replace("\\", "\\\\")}"
}
}
}
project.tasks.register("copyJars", Copy)
{ CopySpec copy ->
copy.group = "Build"
copy.description = "Copy commons-math3 JAR to module's lib directory"
copy.setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
copy.from(project.configurations.external)
copy.into new File("${project.labkey.explodedModuleLibDir}")
copy.include {
"**commons-math3-**.jar"
}
}
project.tasks.named('module').configure { dependsOn(project.tasks.copyJars) }
project.tasks.named('copyJars').configure { mustRunAfter(project.tasks.populateExplodedLib) }