-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
142 lines (121 loc) · 5.78 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
buildscript {
ext.kotlin_version = "1.6.10"
repositories {
maven { url("https://repo1.maven.org/maven2") }
maven { url("https://plugins.gradle.org/m2") }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: "kotlin"
apply plugin: "org.jetbrains.kotlin.jvm"
sourceCompatibility = 8
targetCompatibility = sourceCompatibility
compileKotlin { kotlinOptions.jvmTarget = sourceCompatibility }
compileTestKotlin { kotlinOptions.jvmTarget = sourceCompatibility }
repositories {
maven { url("https://repo1.maven.org/maven2") }
maven { url("https://plugins.gradle.org/m2") }
}
/**
* In case when bioinf-commons is imported to another project,
* it should declare project(":bioinf-commons") with dependencies, otherwise configure root project.
* Ugly, I know.
*/
if (rootProject == project) {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
// Logging dependencies
implementation("ch.qos.logback:logback-classic:1.3.14")
implementation("ch.qos.logback:logback-core:1.3.14")
implementation("com.google.guava:guava:32.0.1-jre")
implementation("org.apache.commons:commons-csv:1.10.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("net.sf.jopt-simple:jopt-simple:5.0.4")
implementation("commons-net:commons-net:3.9.0")
implementation("org.apache.httpcomponents.client5:httpclient5:5.2.1")
implementation("org.jgrapht:jgrapht-core:0.9.2")
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
implementation("com.github.samtools:htsjdk:3.0.1")
implementation("com.github.broadinstitute:picard:2.18.26")
implementation("org.jline:jline-terminal:3.25.1")
implementation("com.carrotsearch:jsuffixarrays:0.1.0")
implementation("org.jetbrains.bio:big:0.9.1")
implementation("org.jetbrains.bio:viktor:1.2.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlin_version")
}
} else {
project(":bioinf-commons") {
configurations {
testOutput.extendsFrom(testCompile)
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
// Logging dependencies
implementation("ch.qos.logback:logback-classic:1.3.14")
implementation("ch.qos.logback:logback-core:1.3.14")
implementation("com.google.guava:guava:32.0.1-jre")
implementation("org.apache.commons:commons-csv:1.10.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("net.sf.jopt-simple:jopt-simple:5.0.4")
implementation("commons-net:commons-net:3.9.0")
implementation("org.apache.httpcomponents.client5:httpclient5:5.2.1")
implementation("org.jgrapht:jgrapht-core:0.9.2")
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
implementation("com.github.samtools:htsjdk:3.0.1")
implementation("com.github.broadinstitute:picard:2.18.26")
implementation("org.jline:jline-terminal:3.25.1")
implementation("com.carrotsearch:jsuffixarrays:0.1.0")
implementation("org.jetbrains.bio:big:0.9.1")
implementation("org.jetbrains.bio:viktor:1.2.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlin_version")
testOutput sourceSets.main.output, sourceSets.test.output
}
}
}
private String settingsFolder(final String propertyName, final String folderName) {
if (!System.hasProperty(propertyName)) {
return "${rootProject.buildDir}/.tests/$folderName"
} else {
return System.getProperty(propertyName)
}
}
task generateTestOrganism(type: JavaExec) {
systemProperty "genomes.path", settingsFolder("genomes.path", "genomes")
systemProperty "experiments.path", settingsFolder("experiments.path", "experiments")
systemProperty "raw.data.path", settingsFolder("experiments.path", "rawdata")
systemProperty "caches.path", settingsFolder("genomes.path", "caches")
systemProperty "logs.path", settingsFolder("experiments.path", "logs")
description "Generates sequences/indexes/genes/etc for test organism"
configure {
main = "org.jetbrains.bio.genome.TestOrganismDataGenerator"
classpath = sourceSets.main.runtimeClasspath
enableAssertions = true
maxHeapSize = "1024m" // Not much RAM is available on TC agents
}
}
tasks.withType(Test) {
dependsOn "generateTestOrganism"
// Continue execution even if tests for some of the
// sub-projects failed.
ignoreFailures = true
maxParallelForks = Runtime.runtime.availableProcessors()
maxHeapSize = "1024m"
testLogging.showStandardStreams = true
systemProperty "genomes.path", settingsFolder("genomes.path", "genomes")
systemProperty "experiments.path", settingsFolder("experiments.path", "experiments")
systemProperty "raw.data.path", settingsFolder("experiments.path", "rawdata")
systemProperty "caches.path", settingsFolder("genomes.path", "caches")
systemProperty "logs.path", settingsFolder("experiments.path", "logs")
systemProperty "teamcity.build.checkoutDir", System.getProperty("teamcity.build.checkoutDir")
}
test {
include "**/*Test.class"
}