Skip to content

Commit 2795c2f

Browse files
OlegDokukarobertroeser
authored andcommitted
BoM project support (rsocket#683)
* drafts bom project support Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * fixes authors list to uptodate one Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
1 parent 573c5a8 commit 2795c2f

4 files changed

Lines changed: 133 additions & 0 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ somasun = somasun <manikandan@fb.com>
1818
stevegury = Steve Gury <sgury@netflix.com>
1919
tmontgomery = Todd L. Montgomery <tmont@nard.net>
2020
yschimke = Yuri Schimke <yuri@schimke.ee>
21+
OlegDokuka = Oleh Dokuka <oleh@netifi.com>

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ subprojects {
183183
name 'Yuri Schimke'
184184
email 'yuri@schimke.ee'
185185
}
186+
developer {
187+
id 'OlegDokuka'
188+
name 'Oleh Dokuka'
189+
email 'oleh@netifi.com'
190+
}
191+
developer {
192+
id 'mostroverkhov'
193+
name 'Maksym Ostroverkhov'
194+
email 'm.ostroverkhov@gmail.com'
195+
}
186196
}
187197

188198
scm {

rsocket-bom/build.gradle

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/*
2+
* Copyright 2015-2019 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
plugins {
17+
id 'java-library'
18+
id 'maven'
19+
id 'maven-publish'
20+
id 'com.jfrog.artifactory'
21+
id 'com.jfrog.bintray'
22+
id 'io.morethan.jmhreport'
23+
id 'me.champeau.gradle.jmh'
24+
}
25+
26+
description = 'Bill of materials to make sure a consistent set of versions is used for RSocket-Java.'
27+
configurations.archives.artifacts.clear()
28+
29+
build.doLast {
30+
pom {
31+
customizePom(it, project)
32+
}
33+
}
34+
35+
dependencies {
36+
compile project(':rsocket-core')
37+
compile project(':rsocket-test')
38+
compile project(':rsocket-load-balancer')
39+
compile project(':rsocket-micrometer')
40+
compile project(':rsocket-transport-local')
41+
compile project(':rsocket-transport-netty')
42+
}
43+
44+
def customizePom(generatedPom, gradleProject) {
45+
//make sure that dependencies are under <dependencyManagement>
46+
generatedPom.withXml {
47+
if (generatedPom.generatedDependencies.size > 0) {
48+
asNode().appendNode('dependencyManagement', asNode().dependencies)
49+
asNode().dependencies.replaceNode {}
50+
}
51+
}
52+
53+
generatedPom.project {
54+
name = 'RSocket-Java Release Train - BOM'
55+
description = gradleProject.description
56+
url = 'http://rsocket.io'
57+
groupId = group
58+
packaging = "pom"
59+
licenses {
60+
license {
61+
name = 'The Apache License, Version 2.0'
62+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
63+
}
64+
}
65+
developers {
66+
developer {
67+
id 'robertroeser'
68+
name 'Robert Roeser'
69+
email 'robert@netifi.com'
70+
}
71+
developer {
72+
id 'rdegnan'
73+
name 'Ryland Degnan'
74+
email 'ryland@netifi.com'
75+
}
76+
developer {
77+
id 'yschimke'
78+
name 'Yuri Schimke'
79+
email 'yuri@schimke.ee'
80+
}
81+
developer {
82+
id 'OlegDokuka'
83+
name 'Oleh Dokuka'
84+
email 'oleh@netifi.com'
85+
}
86+
developer {
87+
id 'mostroverkhov'
88+
name 'Maksym Ostroverkhov'
89+
email 'm.ostroverkhov@gmail.com'
90+
}
91+
}
92+
scm {
93+
connection = 'scm:git:git://github.com/rsocket/rsocket-java.git'
94+
developerConnection = 'scm:git:ssh://github.com/rsocket/rsocket-java.git'
95+
url = 'http://github.com/rsocket/rsocket-java/'
96+
}
97+
issueManagement {
98+
system = "GitHub Issues"
99+
url = "https://github.com/rsocket/rsocket-java/issues"
100+
}
101+
}
102+
103+
generatedPom.writeTo("$buildDir/poms/rsocket-bom-${version}.xml")
104+
}
105+
plugins.withType(MavenPublishPlugin) {
106+
publishing {
107+
publications {
108+
mavenJava(MavenPublication) {
109+
pom.withXml {
110+
def sb = asString()
111+
sb.setLength 0
112+
sb.append file("$buildDir/poms/rsocket-bom-${version}.xml").text
113+
println(sb.toString())
114+
}
115+
}
116+
}
117+
}
118+
}
119+
120+
publish.dependsOn("build")
121+
publishToMavenLocal.dependsOn("build")

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ include 'rsocket-micrometer'
2323
include 'rsocket-test'
2424
include 'rsocket-transport-local'
2525
include 'rsocket-transport-netty'
26+
include 'rsocket-bom'

0 commit comments

Comments
 (0)