-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (63 loc) · 2.01 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
defaultTasks 'dist'
apply plugin: 'project-report'
// Configure compiler options and other things - taken from
// https://github.com/spring-projects/spring-framework/blob/master/build.gradle
configure(subprojects) { project ->
apply plugin: 'eclipse'
ext.gradleScriptDir = "${rootProject.projectDir}"
ext.scriptsDir = "${rootProject.projectDir}/scripts"
ext.distSh = "${scriptsDir}/dist.sh"
ext.distBat = "${scriptsDir}/dist.bat"
ext.commonGradle = "${rootProject.projectDir}/common.gradle"
def defaultDistTasks = [ 'sh', 'bat' ];
def specialDistTasks = [
util: ['jar', 'test'],
];
apply plugin: 'java'
apply from: "${commonGradle}"
[compileJava, compileTestJava]*.options*.compilerArgs = [
"-Xlint:serial",
"-Xlint:varargs",
"-Xlint:cast",
"-Xlint:classfile",
"-Xlint:dep-ann",
"-Xlint:divzero",
"-Xlint:empty",
"-Xlint:finally",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:static",
"-Xlint:try",
"-Xlint:unchecked",
"-Xlint:-options", // intentionally disabled
"-Xlint:-fallthrough", // intentionally disabled
"-Xlint:-rawtypes", // TODO enable and fix warnings
"-Xlint:-deprecation" // TODO enable and fix warnings
]
task dist(dependsOn: specialDistTasks[name] ?: defaultDistTasks);
clean.dependsOn cleanEclipse;
clean {
delete "${projectDir}/${project.name}-${version}.sh"
delete "${projectDir}/${project.name}-${version}.bat"
delete "${projectDir}/${project.name}*log"
delete "${buildDir}"
}
test {
reports.html.enabled = false
}
}
configure(allprojects) { project ->
ext.groovyVersion = '2.4.3'
}
htmlDependencyReport {
projects = project.allprojects
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}
task wrapper(type: Wrapper) {
gradleVersion = "2.11"
}