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
|
// PLUGINS
plugins {
id 'java-library'
}
group = 'org.broadinstitute'
description = """HTTP/S FileSystem provider for Java NIO.2"""
def slf4jVersion = "1.7.25"
dependencies {
// for logging, we use the SLF4J API
implementation "org.slf4j:slf4j-api:" + slf4jVersion
// use TestNG for testing
testImplementation 'org.testng:testng:7.7.0'
testImplementation 'org.mockito:mockito-core:5.2.0'
// add SLF4J implementation for testing
testImplementation "org.slf4j:slf4j-simple:" + slf4jVersion
// include htsjdk for testing some specific issues
testImplementation "com.github.samtools:htsjdk:4.1.1"
}
sourceSets {
test {
java {
exclude "**/MockedIntegrationTest.java"
}
}
}
// test task
tasks.withType(Test) {
// tests could be always re-run
outputs.upToDateWhen { false }
useTestNG()
// do not show the stdout/stderr of the test JVM(s) on the console
testLogging.showStandardStreams = false
// set heap size for the test JVM(s)
minHeapSize = "1G"
maxHeapSize = "2G"
// log the test that is running
beforeTest { descriptor ->
logger.lifecycle("Running Test: " + descriptor)
}
// logging after the tests
testLogging {
testLogging {
events "skipped", "failed"
exceptionFormat = "full"
}
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
// for jar tasks
tasks.withType(Jar) {
// add license
from(rootProject.projectDir) {
include "LICENSE.txt"
into "META-INF"
}
// add manifest information
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
}
|