-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
128 lines (108 loc) · 3.05 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
buildscript {
repositories {
jcenter()
}
}
plugins {
id "maven-publish"
id "com.jfrog.bintray" version "1.7.3"
id 'com.github.johnrengelman.shadow' version '2.0.1'
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
repositories {
jcenter()
}
}
// The gradle variables defined here are visible in sub-projects
ext {
sparkVersion = '2.4.7'
scalaSuffix = "_2.11"
gdmixDataVersion = "0.4.0"
pomConfig = {
licenses {
license {
name "The 2-Clause BSD License"
url "https://opensource.org/licenses/BSD-2-Clause"
distribution "repo"
}
}
developers {
developer {
id "jshi"
name "Jun Shi"
email "[email protected]"
}
developer {
id "mizhou-in"
name "Mingzhou Zhou"
email "[email protected]"
}
}
scm {
url "https://github.com/linkedin/gdmix"
}
}
}
subprojects {
// Put the build dir into the rootProject
buildDir = "../build/$name"
tasks.withType(Jar) {
version "${gdmixDataVersion}"
}
plugins.withType(JavaPlugin) {
tasks.withType(Test) {
useTestNG()
// Exclude tests (ex. gradle test -Pexclude=SomeTestClass)
def excludedTests = project.properties['exclude']
if (excludedTests) {
excludedTests.replaceAll('\\s', '').split('[,]').each {
exclude "**/${it}.class"
}
}
afterSuite { desc, result ->
if (!desc.parent) {
println ":${project.name} -- Executed ${result.testCount} tests: ${result.successfulTestCount} succeeded, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped"
}
}
// Forward standard out from child JVMs to the console
testLogging {
showStackTraces = true
showStandardStreams = true
showExceptions = true
showCauses = true
displayGranularity = maxGranularity
exceptionFormat = 'full'
}
outputs.upToDateWhen { false }
systemProperty "log4j.configuration", "file:${project.rootDir}/log4j.properties"
minHeapSize = "2G"
maxHeapSize = "8G"
}
dependencies {
testCompile 'org.testng:testng:6.10'
}
sourceCompatibility = 1.8
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = ["-feature", "-deprecation", "-verbose", "-optimize", "-unchecked", "-Yinline-warnings", "-g:vars"]
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
}
configurations.zinc.transitive = true
}
idea {
module {
testSourceDirs += file('src/test/scala')
}
}
configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-databind:2.6.7'
}
}
// This task allows to get the dependencies from all the sub-project from the main directory
// (otherwise, you have to change to each sub-project directory to get its dependencies)
task allDeps(type: DependencyReportTask) {}
}