Skip to content

Commit 6883293

Browse files
committed
fixes bom publication
Signed-off-by: Oleh Dokuka <[email protected]>
1 parent 956acdc commit 6883293

File tree

2 files changed

+145
-154
lines changed

2 files changed

+145
-154
lines changed

build.gradle

Lines changed: 140 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -102,103 +102,168 @@ subprojects {
102102
}
103103
}
104104

105-
plugins.withType(JavaPlugin) {
106-
compileJava {
107-
sourceCompatibility = 1.8
105+
if (project.name != 'rsocket-bom') {
108106

109-
// TODO: Cleanup warnings so no need to exclude
110-
options.compilerArgs << '-Xlint:all,-overloads,-rawtypes,-unchecked'
111-
}
107+
plugins.withType(JavaPlugin) {
108+
compileJava {
109+
sourceCompatibility = 1.8
112110

113-
javadoc {
114-
options.with {
115-
links 'https://docs.oracle.com/javase/8/docs/api/'
116-
links 'https://projectreactor.io/docs/core/release/api/'
117-
links 'https://netty.io/4.1/api/'
111+
// TODO: Cleanup warnings so no need to exclude
112+
options.compilerArgs << '-Xlint:all,-overloads,-rawtypes,-unchecked'
118113
}
119-
}
120114

121-
test {
122-
useJUnitPlatform()
115+
javadoc {
116+
options.with {
117+
links 'https://docs.oracle.com/javase/8/docs/api/'
118+
links 'https://projectreactor.io/docs/core/release/api/'
119+
links 'https://netty.io/4.1/api/'
120+
}
121+
}
123122

124-
systemProperty "io.netty.leakDetection.level", "ADVANCED"
125-
}
126-
127-
tasks.named("javadoc").configure {
128-
onlyIf { System.getenv('SKIP_RELEASE') != "true" }
129-
}
130-
}
123+
test {
124+
useJUnitPlatform()
131125

132-
plugins.withType(JavaLibraryPlugin) {
133-
task sourcesJar(type: Jar) {
134-
classifier 'sources'
135-
from sourceSets.main.allJava
126+
systemProperty "io.netty.leakDetection.level", "ADVANCED"
127+
}
128+
129+
tasks.named("javadoc").configure {
130+
onlyIf { System.getenv('SKIP_RELEASE') != "true" }
131+
}
136132
}
137133

138-
task javadocJar(type: Jar, dependsOn: javadoc) {
139-
classifier 'javadoc'
140-
from javadoc.destinationDir
134+
plugins.withType(JavaLibraryPlugin) {
135+
task sourcesJar(type: Jar) {
136+
classifier 'sources'
137+
from sourceSets.main.allJava
138+
}
139+
140+
task javadocJar(type: Jar, dependsOn: javadoc) {
141+
classifier 'javadoc'
142+
from javadoc.destinationDir
143+
}
141144
}
142-
}
143145

144-
plugins.withType(MavenPublishPlugin) {
145-
publishing {
146-
publications {
147-
maven(MavenPublication) {
148-
groupId 'io.rsocket'
146+
plugins.withType(MavenPublishPlugin) {
147+
publishing {
148+
publications {
149+
maven(MavenPublication) {
150+
groupId 'io.rsocket'
149151

150-
from components.java
152+
from components.java
151153

152-
artifact sourcesJar
153-
artifact javadocJar
154+
artifact sourcesJar
155+
artifact javadocJar
154156

155-
pom.withXml {
156-
asNode().':version' + {
157-
resolveStrategy = DELEGATE_FIRST
157+
pom.withXml {
158+
asNode().':version' + {
159+
resolveStrategy = DELEGATE_FIRST
158160

159-
name project.name
160-
description project.description
161-
url 'http://rsocket.io'
161+
name project.name
162+
description project.description
163+
url 'http://rsocket.io'
162164

163-
licenses {
164-
license {
165-
name 'The Apache Software License, Version 2.0'
166-
url 'http://www.apache.org/license/LICENSE-2.0.txt'
165+
licenses {
166+
license {
167+
name 'The Apache Software License, Version 2.0'
168+
url 'http://www.apache.org/license/LICENSE-2.0.txt'
169+
}
167170
}
168-
}
169171

170-
developers {
171-
developer {
172-
id 'robertroeser'
173-
name 'Robert Roeser'
174-
175-
}
176-
developer {
177-
id 'rdegnan'
178-
name 'Ryland Degnan'
179-
172+
developers {
173+
developer {
174+
id 'robertroeser'
175+
name 'Robert Roeser'
176+
177+
}
178+
developer {
179+
id 'rdegnan'
180+
name 'Ryland Degnan'
181+
182+
}
183+
developer {
184+
id 'yschimke'
185+
name 'Yuri Schimke'
186+
187+
}
188+
developer {
189+
id 'OlegDokuka'
190+
name 'Oleh Dokuka'
191+
192+
}
193+
developer {
194+
id 'mostroverkhov'
195+
name 'Maksym Ostroverkhov'
196+
197+
}
180198
}
181-
developer {
182-
id 'yschimke'
183-
name 'Yuri Schimke'
184-
199+
200+
scm {
201+
connection 'scm:git:https://github.com/rsocket/rsocket-java.git'
202+
developerConnection 'scm:git:https://github.com/rsocket/rsocket-java.git'
203+
url 'https://github.com/rsocket/rsocket-java'
185204
}
186-
developer {
187-
id 'OlegDokuka'
188-
name 'Oleh Dokuka'
189-
205+
}
206+
}
207+
}
208+
}
209+
}
210+
}
211+
212+
} else {
213+
plugins.withType(MavenPublishPlugin) {
214+
publishing {
215+
publications {
216+
maven(MavenPublication) {
217+
groupId 'io.rsocket'
218+
219+
pom.withXml {
220+
asNode().':version' + {
221+
resolveStrategy = DELEGATE_FIRST
222+
223+
name project.name
224+
description project.description
225+
url 'http://rsocket.io'
226+
227+
licenses {
228+
license {
229+
name 'The Apache Software License, Version 2.0'
230+
url 'http://www.apache.org/license/LICENSE-2.0.txt'
231+
}
190232
}
191-
developer {
192-
id 'mostroverkhov'
193-
name 'Maksym Ostroverkhov'
194-
233+
234+
developers {
235+
developer {
236+
id 'robertroeser'
237+
name 'Robert Roeser'
238+
239+
}
240+
developer {
241+
id 'rdegnan'
242+
name 'Ryland Degnan'
243+
244+
}
245+
developer {
246+
id 'yschimke'
247+
name 'Yuri Schimke'
248+
249+
}
250+
developer {
251+
id 'OlegDokuka'
252+
name 'Oleh Dokuka'
253+
254+
}
255+
developer {
256+
id 'mostroverkhov'
257+
name 'Maksym Ostroverkhov'
258+
259+
}
195260
}
196-
}
197261

198-
scm {
199-
connection 'scm:git:https://github.com/rsocket/rsocket-java.git'
200-
developerConnection 'scm:git:https://github.com/rsocket/rsocket-java.git'
201-
url 'https://github.com/rsocket/rsocket-java'
262+
scm {
263+
connection 'scm:git:https://github.com/rsocket/rsocket-java.git'
264+
developerConnection 'scm:git:https://github.com/rsocket/rsocket-java.git'
265+
url 'https://github.com/rsocket/rsocket-java'
266+
}
202267
}
203268
}
204269
}

rsocket-bom/build.gradle

Lines changed: 5 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -14,96 +14,22 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
id 'java-library'
18-
id 'maven'
17+
id 'java'
1918
id 'maven-publish'
2019
id 'com.jfrog.artifactory'
2120
id 'com.jfrog.bintray'
22-
id 'io.morethan.jmhreport'
23-
id 'me.champeau.gradle.jmh'
21+
id 'io.spring.dependency-management'
2422
}
2523

2624
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-
}
25+
//configurations.archives.artifacts.clear()
3426

3527
dependencyManagement {
3628
dependencies {
3729
rootProject.subprojects.each {
3830
if (it.name != project.name) {
39-
dependency(group: it.group, name: it.name, version: it.version)
31+
dependency(group: it.group, name: it.name, version: it.version)
4032
}
4133
}
4234
}
43-
}
44-
45-
def customizePom(generatedPom, gradleProject) {
46-
generatedPom.project {
47-
name = 'RSocket-Java Release Train - BOM'
48-
description = gradleProject.description
49-
url = 'http://rsocket.io'
50-
groupId = gradleProject.group
51-
version = gradleProject.version.trim()
52-
packaging = "pom"
53-
licenses {
54-
license {
55-
name = 'The Apache License, Version 2.0'
56-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
57-
}
58-
}
59-
developers {
60-
developer {
61-
id 'robertroeser'
62-
name 'Robert Roeser'
63-
64-
}
65-
developer {
66-
id 'rdegnan'
67-
name 'Ryland Degnan'
68-
69-
}
70-
developer {
71-
id 'yschimke'
72-
name 'Yuri Schimke'
73-
74-
}
75-
developer {
76-
id 'OlegDokuka'
77-
name 'Oleh Dokuka'
78-
79-
}
80-
developer {
81-
id 'mostroverkhov'
82-
name 'Maksym Ostroverkhov'
83-
84-
}
85-
}
86-
scm {
87-
connection = 'scm:git:git://github.com/rsocket/rsocket-java.git'
88-
developerConnection = 'scm:git:ssh://github.com/rsocket/rsocket-java.git'
89-
url = 'http://github.com/rsocket/rsocket-java/'
90-
}
91-
issueManagement {
92-
system = "GitHub Issues"
93-
url = "https://github.com/rsocket/rsocket-java/issues"
94-
}
95-
}
96-
97-
generatedPom.writeTo("$buildDir/poms/rsocket-bom-${version}.xml")
98-
}
99-
plugins.withType(MavenPublishPlugin) {
100-
publishing {
101-
publications {
102-
mavenBom(MavenPublication) {
103-
}
104-
}
105-
}
106-
}
107-
108-
publish.dependsOn("build")
109-
publishToMavenLocal.dependsOn("build")
35+
}

0 commit comments

Comments
 (0)