-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (75 loc) · 2.23 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
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
def scalaBinaryVersion = scalaVersion.take(4)
apply plugin: 'scala'
apply plugin: 'java'
apply plugin: 'idea'
group 'template.spark'
version '1.0-SNAPSHOT'
mainClassName = 'com.deploymentzone.spark.datasource.warc.Main'
configurations {
provided
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
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-sql_${scalaBinaryVersion}:${sparkVersion}"
compile "org.apache.spark:spark-streaming_${scalaBinaryVersion}:${sparkVersion}"
compile "org.apache.spark:spark-core_${scalaBinaryVersion}:${sparkVersion}"
compile("org.netpreserve:jwarc:0.7.0")
testCompile "org.scalatest:scalatest_${scalaBinaryVersion}:3.0.5"
}
jar {
classifier = 'all'
manifest {
attributes 'Implementation-Title': rootProject.name,
'Implementation-Version': version
}
include { sourceSets.main.output.classesDir }
zip64 true
}
idea {
module {
scopes.PROVIDED.plus += [ configurations.provided ]
downloadJavadoc = true
downloadSources = true
}
}
shadowJar {
classifier = 'shadow'
append 'reference.conf'
dependencies {
exclude(dependency('org.scala-lang::'))
exclude(dependency('org.apache.hadoop::'))
exclude(dependency('org.apache.parquet::'))
exclude(dependency('org.apache.avro::'))
exclude(dependency('org.apache.spark::'))
// when running in AWS EMR these dependencies are provided by the environment
//exclude(dependency('com.amazonaws.*::'))
//exclude(dependency('com.amazon.*::'))
//exclude(dependency('org.apache.commons.cli.*::'))
}
exclude 'scala/*'
zip64 true
}
task runSpark(type: JavaExec, dependsOn: classes) {
main = mainClassName
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}