forked from fraunhofer-igd-iva/colormap-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (44 loc) · 1.33 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
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
task installGitHooks(type: Copy) {
description = "Install git hooks (update version file after commit)"
from 'config/git-hooks'
into '.git/hooks'
}
def getGitDesc() {
def cmd = "git describe --match ?.?.?* --dirty"
try {
def proc = cmd.execute()
proc.waitFor() // wait for the command to finish
return proc.in.text.trim() // "out" from the process is "in" for gradle
} catch (IOException e) {
logger.warn("Could not run '$cmd' - using date - {}", e.getLocalizedMessage());
return new Date().format('yyyy-MM-dd-HH-mm-ss');
}
}
subprojects {
apply plugin: 'java'
group = 'de.fhg.igd.iva'
version = getGitDesc()
compileJava.options.encoding = 'ISO-8859-15'
javadoc.options.encoding = 'ISO-8859-15'
sourceCompatibility=1.8
// We use both Maven Central and the Humboldt Artifactory instance, which contains igd-iva/pcolor
repositories {
mavenCentral()
maven {
url "http://artifactory.esdi-humboldt.eu/artifactory/libs-release/"
}
}
task sourceJar(type: Jar) {
description = "Create a JAR with all sources"
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
description = "Create a JAR with the JavaDoc for the java sources"
from javadoc.destinationDir
classifier = 'javadoc'
}
}