-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
121 lines (101 loc) · 3.63 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
/*
* Copyright (c) 2017 German Cancer Research Center (DKFZ).
*
* Distributed under the MIT License (license terms are at https://www.github.com/theroddywms/Roddy/LICENSE.txt).
*/
plugins {
id 'org.ajoberstar.grgit' version '1.7.2'
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'maven'
group = "com.github.theroddywms"
mainClassName = 'de.dkfz.roddy.BEIntegrationTestStarter'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
/*
* Gets the version name from the current Git tag. If the current commit is not tagged,
* this returned string will indicate that. Also if the repository is dirty.
*/
def getVersionName() {
def dirtySuffix = grgit.status().isClean() ? '' : '-dirty'
return grgit.describe() + dirtySuffix
}
rootProject.version = getVersionName()
// Set -Pchecked on the command line to change this compiler parameter.
if (!project.hasProperty("checked") || !project.checked) {
compileJava.options.compilerArgs = ["-Xlint:unchecked"]
compileGroovy.options.compilerArgs = ["-Xlint:unchecked"]
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-core:2.9.7'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.7'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.7'
compile 'org.codehaus.groovy:groovy-all:2.4.9'
testCompile 'junit:junit:4.12'
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
testRuntime "net.bytebuddy:byte-buddy:1.6.5"
testRuntime "org.objenesis:objenesis:2.5.1"
testCompile 'com.google.guava:guava:23.0'
testCompile 'org.slf4j:slf4j-nop:1.7.25'
compile 'org.slf4j:slf4j-api:1.7.25'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
compile group: 'commons-codec', name: 'commons-codec', version: '1.9'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.1'
compile 'com.google.guava:guava:23.0'
compile 'com.github.theroddywms:RoddyToolLib:2.4.0'
}
task writePom {
doLast {
pom {
project {
version rootProject.version
inceptionYear '2017'
licenses {
license {
name 'MIT License'
url 'https://raw.githubusercontent.com/eilslabs/BatchEuphoria/master/LICENSE'
distribution 'repo'
}
}
}
}.writeTo("$buildDir/pom.xml")
}
}
jar {
version = getVersionName()
manifest {
attributes("Implementation-Vendor": "German Cancer Research Center (DKFZ)")
attributes("Implementation-Title": baseName)
attributes 'Implementation-Version': rootProject.version
}
dependsOn writePom
into("META-INF/maven/$project.group/$project.name") {
from "$buildDir/pom.xml"
}
}
task listJars {
doLast {
configurations.compile.each { File file -> println file.name }
}
}
task uberjar(type: Jar, dependsOn:[':compileJava',':compileGroovy']) {
from files(sourceSets.main.output.dirs)
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
version = getVersionName()
manifest {
attributes 'Main-Class': mainClassName
attributes 'Implementation-Version': version
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}