-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (65 loc) · 1.81 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
group = 'collinm'
version = '2'
eclipse.classpath.downloadJavadoc = true
// Repo's
repositories {
mavenCentral()
mavenLocal()
}
configurations {
fat {
transitive = true
}
}
// Dependencies
dependencies {
compile files('lib/opencv-310.jar')
// Utilities
compile 'com.esotericsoftware:kryo:3.0.3'
compile 'com.google.guava:guava:19.0'
compile 'org.javatuples:javatuples:1.2'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'ch.qos.logback:logback-classic:1.1.7'
// Spark
compile('org.apache.spark:spark-core_2.10:1.6.1') {
// Excluding these transitive dependencies prevents SLF4J from complaining, but breaks Spark at runtime (in Eclipse)
//exclude group: 'log4j'
//exclude group: 'org.slf4j'
}
compile('org.apache.spark:spark-mllib_2.10:1.6.1') {
//exclude group: 'log4j'
//exclude group: 'org.slf4j'
}
// Package in the fat jar so they're usable at runtime (in Spark)!
fat 'com.google.guava:guava:19.0'
fat 'org.javatuples:javatuples:1.2'
fat 'ch.qos.logback:logback-classic:1.1.7'
}
tasks.withType(Test) {
systemProperty "java.library.path", "lib/x64/"
}
task fatJar(type:Jar, dependsOn: classes) {
classifier = 'fat'
from(file('src/main/resources/logback.xml'))
from(files(sourceSets.main.output.classesDir))
from(configurations.fat.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
manifest {
attributes 'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date()
}
}
task javadocJar(type: Jar, dependsOn: check) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
}