File: build.gradle

package info (click to toggle)
gatk-bwamem 1.0.4%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,260 kB
  • sloc: ansic: 12,321; java: 860; makefile: 126; sh: 36
file content (69 lines) | stat: -rw-r--r-- 1,606 bytes parent folder | download | duplicates (2)
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
plugins {
    id 'java'
    id 'maven'
}

repositories {
    mavenCentral()
}

dependencies {
    testCompile 'org.testng:testng:6.9.6'
}

group = "org.broadinstitute"
String cpath = "src/main/c"
String libname = "libbwa"

task buildBwaLib(type: Exec){
    workingDir "$cpath"
    outputs.files "$cpath/libbwa*"
    outputs.dir "$cpath/bwa"
    commandLine "make"
    String home = System.properties."java.home"
    //strip the trailing jre
    String corrected = home.endsWith("jre") ?  home.substring(0, home.length() - 4) : home
    environment JAVA_HOME : corrected
    doFirst {  println "using $home -> $corrected as JAVA_HOME" }
}

clean {
    delete "$cpath/bwa"
    delete "$cpath/$libname*"
    delete fileTree("$cpath") {include "$libname*", "*.o"}
}

processResources {
    dependsOn buildBwaLib
//    from cpath
//    include "$libname*"
}

test {
    useTestNG()
    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)"
            }
        }
    }
}

javadoc {
    options.addStringOption('Xdoclint:none', '-quiet')
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from 'build/docs/javadoc'
}

task sourcesJar(type: Jar) {
    from sourceSets.main.allSource
    classifier = 'sources'
}