forked from azkaban/azkaban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (92 loc) · 2.59 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
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.cinnober.gradle:semver-git:2.2.3'
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.10'
}
}
apply plugin: 'com.cinnober.gradle.semver-git'
apply plugin: 'idea'
allprojects {
repositories {
mavenCentral()
mavenLocal()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'net.ltgt.errorprone'
// Set the same version for all sub-projects to root project version
version = rootProject.version
plugins.withType(JavaPlugin) {
sourceCompatibility = JavaVersion.VERSION_1_8
/*
TODO remove afterEvaluate block
After Evaluate block was added to do a lazy evaluation. This piece of code gets executed by gradle in the
configuration phase. However, for some reason the version field was not updated by the LinkedIn build
infrastructure. Thus, using afterEvaluate to do a lazy evaluation of this code block.
More specifically afterEvaluate kicks in after the rest of the project is configured
See: http://stackoverflow.com/questions/16218888/can-gradle-extensions-handle-lazy-evaluation-of-a-property
See: http://stackoverflow.com/questions/16070567/difference-between-gradles-terms-evaluation-and-execution
*/
project.afterEvaluate {
// Set the Title and Version fields in the jar
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
}
dependencies {
testCompile('junit:junit:4.12')
}
}
// Common distribution plugin settings for sub-modules
plugins.withType(DistributionPlugin) {
distTar {
compression = Compression.GZIP
extension = 'tar.gz'
}
}
/**
* Print test execution summary when informational logging is enabled.
*/
test {
testLogging {
exceptionFormat = 'full'
afterSuite { desc, result ->
if (desc.getParent()) {
logger.info desc.getName()
} else {
logger.info "Overall"
}
logger.info " ${result.resultType} (" +
"${result.testCount} tests, " +
"${result.successfulTestCount} passed, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped)"
}
}
}
}
/**
* Gradle wrapper task.
*/
task wrapper(type: Wrapper) {
gradleVersion = '3.3'
}
idea {
project {
languageLevel = '1.8'
vcs = 'Git'
}
}