-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
executable file
·210 lines (165 loc) · 6.4 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
plugins {
id("groovy")
id("com.github.johnrengelman.shadow") version "4.0.4"
}
project.ext {
VERSION="0.0.1"
STAGE="build/stage/groovy-ngs-utils-$VERSION"
SMILE_VERSION='2.6.0'
// GROOVY_VERSION="2.4.13"
}
/*
TODO: use proguard to shrink down the output jars
*/
/*
buildscript {
repositories {
flatDir dirs: '/Users/simon/work/proguard/proguard4.9/lib'
}
dependencies {
classpath ':proguard'
}
}
*/
repositories {
mavenCentral()
maven {
name "biojava"
url "https://www.biojava.org/download/maven/"
}
maven { url 'https://jitpack.io' }
}
configurations {
compile
}
dependencies {
implementation group: 'org.codehaus.groovy', name: 'groovy', version: "$GROOVY_VERSION"
implementation group: 'org.codehaus.groovy', name: 'groovy-xml', version: "$GROOVY_VERSION"
implementation group: 'org.codehaus.groovy', name: 'groovy-ant', version: "$GROOVY_VERSION"
implementation group: 'org.codehaus.groovy', name: 'groovy-json', version: "$GROOVY_VERSION"
implementation group: 'org.codehaus.groovy', name: 'groovy-sql', version: "$GROOVY_VERSION"
if(!GROOVY_VERSION.startsWith('2.4')) {
implementation group: 'org.codehaus.groovy', name: 'groovy-cli-commons', version: "$GROOVY_VERSION"
}
implementation group: 'org.codehaus.gpars', name: 'gpars', version: '1.2.1'
implementation group: 'org.apache.ivy', name:'ivy', version:'2.2.0'
implementation group: 'org.biojava', name: 'biojava-core', version: '4.2.1'
implementation group: 'org.biojava', name:'biojava-alignment', version:'4.2.1'
implementation "org.xerial.snappy:snappy-java:1.1.8.4"
implementation 'com.lowagie:itext:2.1.7'
implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.4.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
implementation 'org.apache.commons:commons-math3:3.0'
implementation group: 'com.google.guava', name: 'guava', version: '26.0-jre'
implementation group: 'com.github.scribejava', name: 'scribejava-core', version: '5.6.0'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.23'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
implementation group: 'com.github.haifengl', name: 'smile-core', version: SMILE_VERSION
implementation group: 'com.github.haifengl', name: 'smile-math', version: SMILE_VERSION
implementation group: 'com.github.haifengl', name: 'smile-netlib', version: '2.4.0'
implementation group: 'com.github.haifengl', name: 'smile-data', version: SMILE_VERSION
if(GROOVY_VERSION.startsWith("3.")) {
implementation 'javax.xml.bind:jaxb-api:2.3.0'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.0.1'
implementation 'javax.activation:activation:1.1.1'
}
implementation group:'org.slf4j', name:'slf4j-jdk14', version: '1.7.5'
// implementation group: 'com.github.samtools', name: 'htsjdk', version: '1.141'
// implementation 'org.utgenome.thirdparty:picard:1.102.0'
implementation 'com.xlson.groovycsv:groovycsv:1.3'
// implementation group: 'de.erichseifert.gral', name: 'gral-core', version: '0.11'
//implementation 'log4j:log4j:1.2.17'
implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.36.0.3'
implementation files(fileTree(dir:'lib', includes:['*.jar']))
implementation project('htsjdk')
implementation project('graxxia')
testImplementation 'junit:junit:4.12'
if(GROOVY_VERSION.startsWith('3.'))
testImplementation('org.spockframework:spock-core:2.3-groovy-3.0')
else
testImplementation('org.spockframework:spock-core:1.3-groovy-2.5')
}
// Bundle all dependencies into output library
jar {
from configurations.compile.grep {
!it.name.startsWith("cramtools") &&
!it.name.contains('log4j') &&
!it.name.startsWith('groovy-') &&
!it.name.contains('-linux-armhf-') &&
!it.name.contains('win-i686') &&
!it.name.contains('linux-i686')
}.collect {
// println "Including $it";
(it.isDirectory() || it.name.endsWith('.pom')) ? it : zipTree(it)
}
/*
from configurations.compile.grep { it.name.startsWith("cramtools") }.collect {
// println "Including $it";
it.isDirectory() ? it : zipTree(it)
}
*/
exclude { details ->
if(details.relativePath.pathString.startsWith("groovy/stream")) {
return false
}
if(details.relativePath.pathString.startsWith("groovy/"))
return true
if(details.relativePath.pathString.contains("groovyjarjar"))
return true
if(details.relativePath.pathString ==~ '.*/Log4J.*.class$')
return true
if(details.relativePath.pathString.contains("log4j"))
return true
if(details.relativePath.pathString.contains("commons/logging"))
return true
if(details.name.endsWith('.pom'))
return true
return false
}
exclude "org/codehaus/**"
exclude "META-INF/groovy*"
exclude "META-INF/**/*groovy*"
exclude "META-INF/BCKEY*"
exclude "org/bouncycastle/**"
exclude "org/codehaus/mojo"
exclude "org/slf4j/impl/**"
}
groovydoc {
destinationDir = new File('doc').absoluteFile
source = 'src/main/groovy'
overviewText = resources.text.fromFile('src/main/groovy/overview.html')
docTitle = ''
doLast {
println "Doing it now"
ant.copy file:"src/main/resources/docstyle.css", tofile:'doc/stylesheet.css', overwrite:true
}
}
// println "The gradle version is: " + project.gradle.gradleVersion
compileGroovy {
if(project.gradle.gradleVersion.tokenize('.')[0].toInteger() > 5 )
groovyOptions.parameters = true
}
test {
filter {
includeTestsMatching "gngs.*"
}
/* Uncomment to see test output
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
*/
}
shadowJar {
mergeServiceFiles()
mergeGroovyExtensionModules()
archiveFileName = 'groovy-ngs-utils.jar'
duplicatesStrategy = 'exclude'
zip64 = true
}
if (rootProject == project) {
wrapper {
gradleVersion = '5.2.1'
}
}