forked from azagniotov/stubby4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (78 loc) · 2.77 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
// vim: ft=groovy
defaultTasks 'clean', 'build'
description = 'Gradle configuration for stubby4j'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.2'
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'project-report'
project.buildDir = 'target'
}
apply from: "$rootDir/conf/gradle/ides.gradle"
subprojects {
subproject ->
sourceCompatibility = 1.6
tasks.withType(Compile) {
doFirst {
assert sourceCompatibility == "1.6": "The sourceCompatibility of $name was changed!"
}
options.encoding = 'UTF-8'
}
targetCompatibility = 1.6
repositories {
mavenCentral()
mavenLocal()
}
test {
testReport = false
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
showExceptions true
showCauses true
showStackTraces true
if (subproject.name != 'main') {
def testCounter = 0
afterSuite { testDescriptor, testResult ->
if (testDescriptor.getName().contains("$stubbyProjectGroup")) {
testCounter += testResult.getTestCount()
}
}
doFirst {
println ""
println "*******************************************************************************************"
println "******** Running " + subproject.name.toUpperCase() + " Module Tests"
println "*******************************************************************************************"
}
doLast {
println "*******************************************************************************************"
println "******** Finished " + (testCounter + 3) + " " + subproject.name.toUpperCase() + " Tests!"
println "*******************************************************************************************"
println ""
}
}
}
}
apply from: "$rootDir/conf/gradle/dependencies.gradle"
if (subproject.name != 'main' && subproject.name != 'builders') {
apply from: "$rootDir/conf/gradle/cobertura.gradle"
}
}
project(":").tasks.each {
task ->
def taskNameLowerCase = task.name.toLowerCase()
if (!taskNameLowerCase.contains("idea") &&
!taskNameLowerCase.contains("eclipse") &&
!taskNameLowerCase.contains("clean")) {
task.enabled = false
println ":" + task.name + " => Disabling task.."
}
}