File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ plugins {
2+ id ' java-platform'
3+ id " maven-publish"
4+ }
5+
6+ description = ' gRPC: BOM'
7+
8+ gradle. projectsEvaluated {
9+ def projectsToInclude = rootProject. subprojects. findAll {
10+ return it. name != ' grpc-compiler'
11+ && it. plugins. hasPlugin(' java' )
12+ && it. plugins. hasPlugin(' maven-publish' )
13+ && it. tasks. findByName(' publishMavenPublicationToMavenRepository' )?. enabled
14+ }
15+ dependencies {
16+ constraints {
17+ projectsToInclude. each { api it }
18+ }
19+ }
20+ }
21+
22+ publishing {
23+ publications {
24+ maven(MavenPublication ) {
25+ from components. javaPlatform
26+ pom. withXml {
27+ def dependencies = asNode(). dependencyManagement. dependencies. last()
28+ // add protoc gen (produced by grpc-compiler with different artifact name)
29+ // not sure how to express "<type>pom</type>" in gradle, kept in XML
30+ def dependencyNode = dependencies. appendNode(' dependency' )
31+ dependencyNode. appendNode(' groupId' , project. group)
32+ dependencyNode. appendNode(' artifactId' , ' protoc-gen-grpc-java' )
33+ dependencyNode. appendNode(' version' , project. version)
34+ dependencyNode. appendNode(' type' , ' pom' )
35+ }
36+ }
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments