-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
executable file
·98 lines (82 loc) · 2.31 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
91
92
93
94
95
96
97
98
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
group 'nl.jongensvantechniek'
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"
}
}
ext {
mainClassFile='nl.jongensvantechniek.movierecommendations.application.Main'
title='movie-recommandations-engine'
commonsioVersions=2.5
version='0.0.1'
scalaVersion='2.11.8'
slf4jVersion='1.7.21'
logbackVersion='1.1.7'
sparkVersion='2.2.2'
}
dependencies {
//Scala
compile "org.scala-lang:scala-library:$scalaVersion"
compile "org.scala-lang:scala-reflect:$scalaVersion"
compile "org.scala-lang:scala-compiler:$scalaVersion"
//Spark
compile "org.apache.spark:spark-mllib_2.11:$sparkVersion"
compile "org.apache.spark:spark-sql_2.11:$sparkVersion"
compile "org.apache.spark:spark-streaming-flume-assembly_2.11:$sparkVersion"
compile "org.apache.spark:spark-graphx_2.11:$sparkVersion"
compile "org.apache.spark:spark-launcher_2.11:$sparkVersion"
compile "org.apache.spark:spark-catalyst_2.11:$sparkVersion"
compile "org.apache.spark:spark-streaming_2.11:$sparkVersion"
compile "org.apache.spark:spark-core_2.11:$sparkVersion"
//Commons
compile "commons-io:commons-io:$commonsioVersions"
}
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 ]
}
}