-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathbuild.gradle
81 lines (70 loc) · 2.29 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
plugins {
id "java-library"
id "maven-publish"
id "com.github.kt3k.coveralls"
}
description = "gRPC: All"
def subprojects = [
project(':grpc-api'),
project(':grpc-auth'),
project(':grpc-context'),
project(':grpc-core'),
project(':grpc-grpclb'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-protobuf'),
project(':grpc-protobuf-lite'),
project(':grpc-rls'),
project(':grpc-services'),
project(':grpc-stub'),
project(':grpc-testing'),
project(':grpc-xds'),
]
for (subproject in subprojects) {
if (subproject == project) {
continue
}
evaluationDependsOn(subproject.path)
}
evaluationDependsOn(':grpc-interop-testing')
dependencies {
api subprojects.minus([project(':grpc-protobuf-lite')])
}
tasks.named("javadoc").configure {
classpath = files(subprojects.collect { subproject ->
subproject.javadoc.classpath
})
for (subproject in subprojects) {
if (subproject == project) {
continue;
}
source subproject.javadoc.source
options.links subproject.javadoc.options.links.toArray(new String[0])
}
}
tasks.register("jacocoMerge", JacocoMerge) {
dependsOn(subprojects.jacocoTestReport.dependsOn)
dependsOn(project(':grpc-interop-testing').jacocoTestReport.dependsOn)
mustRunAfter(subprojects.jacocoTestReport.mustRunAfter)
mustRunAfter(project(':grpc-interop-testing').jacocoTestReport.mustRunAfter)
destinationFile = file("${buildDir}/jacoco/test.exec")
executionData = files(subprojects.jacocoTestReport.executionData)
.plus(project(':grpc-interop-testing').jacocoTestReport.executionData)
.filter { f -> f.exists() }
}
tasks.named("jacocoTestReport").configure {
dependsOn(jacocoMerge)
reports {
xml.required = true
html.required = true
}
subprojects.each { subproject ->
additionalSourceDirs.from(subproject.jacocoTestReport.additionalSourceDirs)
sourceDirectories.from(subproject.jacocoTestReport.sourceDirectories)
classDirectories.from(subproject.jacocoTestReport.classDirectories)
}
}
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
}
tasks.named("coveralls").configure { dependsOn tasks.named("jacocoTestReport") }