forked from CalebFenton/simplify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (82 loc) · 2.34 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
apply plugin: 'idea'
version = '1.0.0'
def jarVersion = version
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.5.0'
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'org.cf'
sourceCompatibility = 1.8
version = parent.version
jar {
version = jarVersion
}
ext {
depends = [
commons_lang: 'org.apache.commons:commons-lang3:3.4',
findbugs: 'com.google.code.findbugs:jsr305:3.0.1',
guava: 'com.google.guava:guava:19.0',
junit: 'junit:junit:4.12',
mockito: 'org.mockito:mockito-core:1.10.19',
perfidix: 'org.perfidix:perfidix:3.6.9',
proguard_gradle: 'net.sf.proguard:proguard-gradle:5.2.1',
slf4j_api: 'org.slf4j:slf4j-api:1.7.16',
trove4j: 'net.sf.trove4j:trove4j:3.0.3',
]
}
// This is just to show off API usage. No tests needed.
if (!project.name.equals("demoapp")) {
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
}
}
coveralls {
sourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs).files.absolutePath
}
task jacocoTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
ext.targetProjects = subprojects - project(':demoapp')
dependsOn = ext.targetProjects.test
sourceDirectories = files(ext.targetProjects.sourceSets.main.allSource.srcDirs)
classDirectories = files(ext.targetProjects.sourceSets.main.output)
executionData = files(ext.targetProjects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
}