forked from faizanahemad/spark-gradle-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
83 lines (69 loc) · 1.94 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
group 'template.spark'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
provided
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
compile "org.scala-lang:scala-library:"+scalaVersion
compile "org.scala-lang:scala-reflect:"+scalaVersion
compile "org.scala-lang:scala-compiler:"+scalaVersion
compile 'org.apache.spark:spark-mllib_2.11:2.1.0'
compile 'org.apache.spark:spark-sql_2.11:2.1.0'
compile 'org.apache.spark:spark-streaming-flume-assembly_2.11:2.1.0'
compile 'org.apache.spark:spark-graphx_2.11:2.1.0'
compile 'org.apache.spark:spark-launcher_2.11:2.1.0'
compile 'org.apache.spark:spark-catalyst_2.11:2.1.0'
compile 'org.apache.spark:spark-streaming_2.11:2.1.0'
compile 'org.apache.spark:spark-core_2.11:2.1.0'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
}
task run(type: JavaExec, dependsOn: classes) {
main = mainClassFile
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
jar {
classifier = 'all'
manifest {
attributes 'Implementation-Title': title,
'Implementation-Version': version,
'Main-Class': mainClassFile
}
include{sourceSets.main.output.classesDir}
zip64 true
}
shadowJar {
classifier = 'shadow'
append 'reference.conf'
dependencies {
}
}
idea {
module {
// IntelliJ does not know about the standard idiom of provided as used in managing
// uber/shaded jar dependencies. Make it so!
scopes.PROVIDED.plus += [ configurations.provided ]
}
}