Eric Anderson | 3c3a823 | 2019-09-07 08:18:57 -0700 | [diff] [blame] | 1 | plugins { |
ZHANG Dapeng | 7b3b9a2 | 2020-05-11 09:48:33 -0700 | [diff] [blame] | 2 | id "java-library" |
Eric Anderson | 5b838e5 | 2019-09-07 09:27:32 -0700 | [diff] [blame] | 3 | id "maven-publish" |
| 4 | |
Eric Anderson | 3c3a823 | 2019-09-07 08:18:57 -0700 | [diff] [blame] | 5 | id "com.github.kt3k.coveralls" |
| 6 | } |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 7 | |
nmittler | f831458 | 2015-01-27 10:25:39 -0800 | [diff] [blame] | 8 | description = "gRPC: All" |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 9 | |
Eric Anderson | 9bd7bab | 2015-08-07 16:22:46 -0700 | [diff] [blame] | 10 | def subprojects = [ |
Eric Anderson | 80c3c99 | 2019-04-12 17:37:13 -0700 | [diff] [blame] | 11 | project(':grpc-api'), |
ZHANG Dapeng | 5ce10f0 | 2018-06-11 18:35:18 -0700 | [diff] [blame] | 12 | project(':grpc-auth'), |
ZHANG Dapeng | 5ce10f0 | 2018-06-11 18:35:18 -0700 | [diff] [blame] | 13 | project(':grpc-context'), |
Eric Anderson | 84dd812 | 2016-12-07 10:53:55 -0800 | [diff] [blame] | 14 | project(':grpc-core'), |
| 15 | project(':grpc-grpclb'), |
ZHANG Dapeng | 5ce10f0 | 2018-06-11 18:35:18 -0700 | [diff] [blame] | 16 | project(':grpc-netty'), |
| 17 | project(':grpc-okhttp'), |
| 18 | project(':grpc-protobuf'), |
| 19 | project(':grpc-protobuf-lite'), |
Jihun Cho | 8e84777 | 2020-05-05 10:11:33 -0700 | [diff] [blame] | 20 | project(':grpc-rls'), |
Eric Anderson | 84dd812 | 2016-12-07 10:53:55 -0800 | [diff] [blame] | 21 | project(':grpc-services'), |
Colin Alworth | 706646f | 2023-01-20 15:17:58 -0600 | [diff] [blame] | 22 | project(':grpc-servlet'), |
| 23 | project(':grpc-servlet-jakarta'), |
ZHANG Dapeng | 5ce10f0 | 2018-06-11 18:35:18 -0700 | [diff] [blame] | 24 | project(':grpc-stub'), |
| 25 | project(':grpc-testing'), |
Eric Anderson | fb8833c | 2020-03-31 18:04:57 -0700 | [diff] [blame] | 26 | project(':grpc-xds'), |
Eric Anderson | 9bd7bab | 2015-08-07 16:22:46 -0700 | [diff] [blame] | 27 | ] |
| 28 | |
Eric Anderson | 8a9aa41 | 2021-04-13 12:39:09 -0700 | [diff] [blame] | 29 | for (subproject in subprojects) { |
Eric Anderson | 10fb206 | 2015-05-05 10:28:38 -0700 | [diff] [blame] | 30 | if (subproject == project) { |
| 31 | continue |
| 32 | } |
| 33 | evaluationDependsOn(subproject.path) |
| 34 | } |
Eric Anderson | 8a9aa41 | 2021-04-13 12:39:09 -0700 | [diff] [blame] | 35 | evaluationDependsOn(':grpc-interop-testing') |
Eric Anderson | 10fb206 | 2015-05-05 10:28:38 -0700 | [diff] [blame] | 36 | |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 37 | dependencies { |
ZHANG Dapeng | 23bb2eb | 2021-02-08 21:39:54 -0800 | [diff] [blame] | 38 | api subprojects.minus([project(':grpc-protobuf-lite')]) |
Eric Anderson | 1551cc7 | 2023-04-13 08:52:20 -0700 | [diff] [blame] | 39 | implementation libraries.guava.jre // JRE required by transitive protobuf-java-util |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 40 | } |
| 41 | |
Eric Anderson | 0ff9f37 | 2022-07-01 15:48:38 -0700 | [diff] [blame] | 42 | tasks.named("javadoc").configure { |
Eric Anderson | 9bd7bab | 2015-08-07 16:22:46 -0700 | [diff] [blame] | 43 | classpath = files(subprojects.collect { subproject -> |
Eric Anderson | 10fb206 | 2015-05-05 10:28:38 -0700 | [diff] [blame] | 44 | subproject.javadoc.classpath |
| 45 | }) |
Eric Anderson | 9bd7bab | 2015-08-07 16:22:46 -0700 | [diff] [blame] | 46 | for (subproject in subprojects) { |
Eric Anderson | 10fb206 | 2015-05-05 10:28:38 -0700 | [diff] [blame] | 47 | 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 Anderson | 041cdb1 | 2015-05-05 12:29:26 -0700 | [diff] [blame] | 54 | |
Eric Anderson | 8dbc88f | 2023-05-08 10:46:10 -0700 | [diff] [blame] | 55 | tasks.named("jacocoTestReport").configure { |
Eric Anderson | 6715f12 | 2016-02-13 14:43:38 -0800 | [diff] [blame] | 56 | dependsOn(subprojects.jacocoTestReport.dependsOn) |
Eric Anderson | 31cfb6d | 2021-04-16 11:10:04 -0700 | [diff] [blame] | 57 | dependsOn(project(':grpc-interop-testing').jacocoTestReport.dependsOn) |
Eric Anderson | 8dbc88f | 2023-05-08 10:46:10 -0700 | [diff] [blame] | 58 | executionData.from files(subprojects.jacocoTestReport.executionData) |
ZHANG Dapeng | 5ce10f0 | 2018-06-11 18:35:18 -0700 | [diff] [blame] | 59 | .plus(project(':grpc-interop-testing').jacocoTestReport.executionData) |
| 60 | .filter { f -> f.exists() } |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 61 | reports { |
Eric Anderson | d44de50 | 2022-01-07 09:54:50 -0800 | [diff] [blame] | 62 | xml.required = true |
| 63 | html.required = true |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 64 | } |
Eric Anderson | 041cdb1 | 2015-05-05 12:29:26 -0700 | [diff] [blame] | 65 | |
Eric Anderson | 186cfeb | 2020-03-31 18:04:10 -0700 | [diff] [blame] | 66 | subprojects.each { subproject -> |
| 67 | additionalSourceDirs.from(subproject.jacocoTestReport.additionalSourceDirs) |
| 68 | sourceDirectories.from(subproject.jacocoTestReport.sourceDirectories) |
| 69 | classDirectories.from(subproject.jacocoTestReport.classDirectories) |
| 70 | } |
Eric Anderson | 041cdb1 | 2015-05-05 12:29:26 -0700 | [diff] [blame] | 71 | } |
Eric Anderson | 522580d | 2015-08-07 18:02:31 -0700 | [diff] [blame] | 72 | |
| 73 | coveralls { |
| 74 | sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten() |
| 75 | } |
| 76 | |
Eric Anderson | 0ff9f37 | 2022-07-01 15:48:38 -0700 | [diff] [blame] | 77 | tasks.named("coveralls").configure { dependsOn tasks.named("jacocoTestReport") } |