blob: 100e016aa3ccfebf787c7e99b19a72086ed9719d [file] [log] [blame]
Eric Anderson3c3a8232019-09-07 08:18:57 -07001plugins {
ZHANG Dapeng7b3b9a22020-05-11 09:48:33 -07002 id "java-library"
Eric Anderson5b838e52019-09-07 09:27:32 -07003 id "maven-publish"
4
Eric Anderson3c3a8232019-09-07 08:18:57 -07005 id "com.github.kt3k.coveralls"
6}
Eric Anderson522580d2015-08-07 18:02:31 -07007
nmittlerf8314582015-01-27 10:25:39 -08008description = "gRPC: All"
nathanmittler164b7342014-12-15 09:58:05 -08009
Eric Anderson9bd7bab2015-08-07 16:22:46 -070010def subprojects = [
Eric Anderson80c3c992019-04-12 17:37:13 -070011 project(':grpc-api'),
ZHANG Dapeng5ce10f02018-06-11 18:35:18 -070012 project(':grpc-auth'),
ZHANG Dapeng5ce10f02018-06-11 18:35:18 -070013 project(':grpc-context'),
Eric Anderson84dd8122016-12-07 10:53:55 -080014 project(':grpc-core'),
15 project(':grpc-grpclb'),
ZHANG Dapeng5ce10f02018-06-11 18:35:18 -070016 project(':grpc-netty'),
17 project(':grpc-okhttp'),
18 project(':grpc-protobuf'),
19 project(':grpc-protobuf-lite'),
Jihun Cho8e847772020-05-05 10:11:33 -070020 project(':grpc-rls'),
Eric Anderson84dd8122016-12-07 10:53:55 -080021 project(':grpc-services'),
Colin Alworth706646f2023-01-20 15:17:58 -060022 project(':grpc-servlet'),
23 project(':grpc-servlet-jakarta'),
ZHANG Dapeng5ce10f02018-06-11 18:35:18 -070024 project(':grpc-stub'),
25 project(':grpc-testing'),
Eric Andersonfb8833c2020-03-31 18:04:57 -070026 project(':grpc-xds'),
Eric Anderson9bd7bab2015-08-07 16:22:46 -070027]
28
Eric Anderson8a9aa412021-04-13 12:39:09 -070029for (subproject in subprojects) {
Eric Anderson10fb2062015-05-05 10:28:38 -070030 if (subproject == project) {
31 continue
32 }
33 evaluationDependsOn(subproject.path)
34}
Eric Anderson8a9aa412021-04-13 12:39:09 -070035evaluationDependsOn(':grpc-interop-testing')
Eric Anderson10fb2062015-05-05 10:28:38 -070036
nathanmittler164b7342014-12-15 09:58:05 -080037dependencies {
ZHANG Dapeng23bb2eb2021-02-08 21:39:54 -080038 api subprojects.minus([project(':grpc-protobuf-lite')])
Eric Anderson1551cc72023-04-13 08:52:20 -070039 implementation libraries.guava.jre // JRE required by transitive protobuf-java-util
nathanmittler164b7342014-12-15 09:58:05 -080040}
41
Eric Anderson0ff9f372022-07-01 15:48:38 -070042tasks.named("javadoc").configure {
Eric Anderson9bd7bab2015-08-07 16:22:46 -070043 classpath = files(subprojects.collect { subproject ->
Eric Anderson10fb2062015-05-05 10:28:38 -070044 subproject.javadoc.classpath
45 })
Eric Anderson9bd7bab2015-08-07 16:22:46 -070046 for (subproject in subprojects) {
Eric Anderson10fb2062015-05-05 10:28:38 -070047 if (subproject == project) {
48 continue;
49 }
50 source subproject.javadoc.source
51 options.links subproject.javadoc.options.links.toArray(new String[0])
52 }
53}
Eric Anderson041cdb12015-05-05 12:29:26 -070054
Eric Anderson8dbc88f2023-05-08 10:46:10 -070055tasks.named("jacocoTestReport").configure {
Eric Anderson6715f122016-02-13 14:43:38 -080056 dependsOn(subprojects.jacocoTestReport.dependsOn)
Eric Anderson31cfb6d2021-04-16 11:10:04 -070057 dependsOn(project(':grpc-interop-testing').jacocoTestReport.dependsOn)
Eric Anderson8dbc88f2023-05-08 10:46:10 -070058 executionData.from files(subprojects.jacocoTestReport.executionData)
ZHANG Dapeng5ce10f02018-06-11 18:35:18 -070059 .plus(project(':grpc-interop-testing').jacocoTestReport.executionData)
60 .filter { f -> f.exists() }
Eric Anderson522580d2015-08-07 18:02:31 -070061 reports {
Eric Andersond44de502022-01-07 09:54:50 -080062 xml.required = true
63 html.required = true
Eric Anderson522580d2015-08-07 18:02:31 -070064 }
Eric Anderson041cdb12015-05-05 12:29:26 -070065
Eric Anderson186cfeb2020-03-31 18:04:10 -070066 subprojects.each { subproject ->
67 additionalSourceDirs.from(subproject.jacocoTestReport.additionalSourceDirs)
68 sourceDirectories.from(subproject.jacocoTestReport.sourceDirectories)
69 classDirectories.from(subproject.jacocoTestReport.classDirectories)
70 }
Eric Anderson041cdb12015-05-05 12:29:26 -070071}
Eric Anderson522580d2015-08-07 18:02:31 -070072
73coveralls {
74 sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
75}
76
Eric Anderson0ff9f372022-07-01 15:48:38 -070077tasks.named("coveralls").configure { dependsOn tasks.named("jacocoTestReport") }