• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1description = "OpenCensus All"
2
3def subprojects = [
4        project(':opencensus-api'),
5        project(':opencensus-impl-core'),
6        project(':opencensus-impl'),
7        project(':opencensus-impl-lite'),
8        project(':opencensus-testing'),
9        project(':opencensus-contrib-agent'),
10        project(':opencensus-contrib-appengine-standard-util'),
11        project(':opencensus-contrib-dropwizard'),
12        project(':opencensus-contrib-exemplar-util'),
13        project(':opencensus-contrib-grpc-util'),
14        project(':opencensus-contrib-grpc-metrics'),
15        project(':opencensus-contrib-http-util'),
16        project(':opencensus-contrib-log-correlation-stackdriver'),
17        project(':opencensus-contrib-monitored-resource-util'),
18        project(':opencensus-contrib-spring'),
19        project(':opencensus-contrib-spring-sleuth-v1x'),
20        project(':opencensus-contrib-zpages'),
21        project(':opencensus-exporter-trace-logging'),
22        project(':opencensus-exporter-trace-ocagent'),
23        project(':opencensus-exporter-trace-stackdriver'),
24        project(':opencensus-exporter-trace-zipkin'),
25        project(':opencensus-exporter-trace-jaeger'),
26        project(':opencensus-exporter-stats-signalfx'),
27        project(':opencensus-exporter-stats-stackdriver'),
28        project(':opencensus-exporter-stats-prometheus'),
29]
30
31// A subset of subprojects for which we want to publish javadoc.
32def subprojects_javadoc = [
33        project(':opencensus-api'),
34        project(':opencensus-testing'),
35        project(':opencensus-contrib-agent'),
36        project(':opencensus-contrib-appengine-standard-util'),
37        project(':opencensus-contrib-dropwizard'),
38        project(':opencensus-contrib-exemplar-util'),
39        project(':opencensus-contrib-grpc-util'),
40        project(':opencensus-contrib-grpc-metrics'),
41        project(':opencensus-contrib-http-util'),
42        project(':opencensus-contrib-log-correlation-stackdriver'),
43        project(':opencensus-contrib-monitored-resource-util'),
44        project(':opencensus-contrib-spring'),
45        project(':opencensus-contrib-spring-sleuth-v1x'),
46        project(':opencensus-contrib-zpages'),
47        project(':opencensus-exporter-trace-logging'),
48        project(':opencensus-exporter-trace-ocagent'),
49        project(':opencensus-exporter-trace-stackdriver'),
50        project(':opencensus-exporter-trace-zipkin'),
51        project(':opencensus-exporter-trace-jaeger'),
52        project(':opencensus-exporter-stats-signalfx'),
53        project(':opencensus-exporter-stats-stackdriver'),
54        project(':opencensus-exporter-stats-prometheus'),
55]
56
57for (subproject in rootProject.subprojects) {
58    if (subproject == project) {
59        continue
60    }
61    evaluationDependsOn(subproject.path)
62}
63
64dependencies {
65    compile subprojects
66}
67
68javadoc {
69    classpath = files(subprojects_javadoc.collect { subproject ->
70        subproject.javadoc.classpath
71    })
72    for (subproject in subprojects_javadoc) {
73        if (subproject == project) {
74            continue;
75        }
76        source subproject.javadoc.source
77        options.links subproject.javadoc.options.links.toArray(new String[0])
78    }
79    exclude 'io/opencensus/internal/**'
80}
81
82task jacocoMerge(type: JacocoMerge) {
83    dependsOn(subprojects.jacocoTestReport.dependsOn)
84    mustRunAfter(subprojects.jacocoTestReport.mustRunAfter)
85    destinationFile = file("${buildDir}/jacoco/test.exec")
86    executionData = files(subprojects.jacocoTestReport.executionData)
87            .filter { f -> f.exists() }
88}
89
90jacocoTestReport {
91    dependsOn(jacocoMerge)
92    reports {
93        xml.enabled = true
94        html.enabled = true
95    }
96
97    additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
98    sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
99    classDirectories = files(subprojects.sourceSets.main.output)
100    classDirectories = files(classDirectories.files.collect {
101        fileTree(dir: it)
102    })
103}
104