-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild.gradle
More file actions
56 lines (49 loc) · 1.19 KB
/
Copy pathbuild.gradle
File metadata and controls
56 lines (49 loc) · 1.19 KB
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
}
}
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.6
version = '1.0'
repositories {
mavenCentral()
}
configurations {
provided
compile.extendsFrom provided
}
task sunnyJar(type: Jar) {
dependsOn configurations.runtime
manifest {
attributes 'Main-class': 'com.sunny.spark.demo.SparkDemo'
}
from {
(configurations.runtime - configurations.provided).collect {
it.isDirectory() ? it : zipTree(it)
}
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
}
dependencies {
compile "org.apache.spark:spark-streaming_2.10:1.2.0"
compile "com.google.guava:guava:r05"
//provided "org.scala-lang:scala-library:2.10.4"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
shadowJar {
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
resource = 'reference.conf'
}
manifest {
inheritFrom project.tasks.sunnyJar.manifest
}
}