-
Notifications
You must be signed in to change notification settings - Fork 0
/
versions.gradle
89 lines (81 loc) · 2.33 KB
/
versions.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
project.ext.scalaVersionMap = [
'2.11': '2.11.12',
'2.12': '2.12.13',
'2.13': '2.13.5'
]
project.ext.sparkVersionMap = [
'2.0': '2.0.2',
'2.1': '2.1.3',
'2.2': '2.2.3',
'2.3': '2.3.3',
'2.4': '2.4.8',
'3.0': '3.0.3',
'3.1': '3.1.3',
'3.2': '3.2.1',
]
project.ext.sparkTestVersionMap = [
'2.11': [
'2.0': '2.0.2_0.14.0',
'2.1': '2.1.3_0.14.0',
'2.2': '2.2.3_0.14.0',
'2.3': '2.3.3_0.14.0',
'2.4': '2.4.5_0.14.0'
],
'2.12': [
'2.4': '2.4.7_1.1.1',
'3.0': '3.0.2_1.1.1',
'3.1': '3.1.2_1.1.1',
'3.2': '3.2.0_1.1.1',
]
]
String getScalaBinaryVersion() {
if (project.hasProperty("scala-version")) {
def scalaBinaryVersion = project.property("scala-version")
if (project.ext.scalaVersionMap.containsKey(scalaBinaryVersion)) {
return scalaBinaryVersion
} else {
throw new RuntimeException("unknown scala version $scalaBinaryVersion")
}
} else {
return '2.11'
}
}
String getScalaVersion() {
return project.ext.scalaVersionMap[getScalaBinaryVersion()]
}
String getSparkMinorVersion() {
if (project.hasProperty("spark-version")) {
def sparkMinorVersion = project.property("spark-version")
if (project.ext.sparkVersionMap.containsKey(sparkMinorVersion)) {
return sparkMinorVersion
} else {
throw new RuntimeException("unknown spark version $sparkMinorVersion")
}
} else {
return '2.4'
}
}
String getSparkVersion() {
return project.ext.sparkVersionMap[getSparkMinorVersion()]
}
ext {
neutrinoVersion = '0.1.0'
targetJavaVersion = '1.8'
scalaVersion = getScalaVersion()
scalaBinaryVersion = getScalaBinaryVersion()
sparkMinorVersion = getSparkMinorVersion()
sparkVersion = getSparkVersion()
sparkTestVersion = project.ext.sparkTestVersionMap[getScalaBinaryVersion()][getSparkMinorVersion()].toString()
scalaTestVersion = '3.0.8'
junitVersion = '4.13.1'
slf4jVersion = '1.7.28'
silencerVersion = '1.7.8'
spotbugsVersion = '4.5.3'
guavaVersion = '30.0-jre'
scoveragePluginVersion = '7.0.0'
guiceVersion = '4.2.3'
scalaGuiceVersion = '4.2.11'
scoverageVersion = '1.4.11'
jacksonVersion = '2.13.2'
kafkaClientVersion = '2.7.2'
}