Skip to content

Commit dff7e2a

Browse files
committed
Stabilize composite rsocket-java build for broker tests
Signed-off-by: jeroen.veltman <jeroen.veltman@nextend.nl>
1 parent 08b2f47 commit dff7e2a

3 files changed

Lines changed: 35 additions & 17 deletions

File tree

build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
plugins {
1818
id 'com.github.sherter.google-java-format' version '0.9' apply false
1919
id 'me.champeau.jmh' version '0.7.1' apply false
20-
id 'io.spring.dependency-management' version '1.1.0' apply false
20+
id 'io.spring.dependency-management' version '1.1.7' apply false
2121
id 'io.morethan.jmhreport' version '0.9.0' apply false
2222
id 'io.github.reyerizo.gradle.jcstress' version '0.8.15' apply false
2323
id 'com.github.vlsi.gradle-extensions' version '1.89' apply false
2424
}
2525

26+
def compositeConsumer = System.getProperty("rsocket.java.composite.consumer")
27+
2628
boolean isCiServer = ["CI", "CONTINUOUS_INTEGRATION", "TRAVIS", "CIRCLECI", "bamboo_planKey", "GITHUB_ACTION"].with {
2729
retainAll(System.getenv().keySet())
2830
return !isEmpty()
@@ -226,12 +228,12 @@ subprojects {
226228

227229
plugins.withType(JavaLibraryPlugin) {
228230
task sourcesJar(type: Jar) {
229-
classifier 'sources'
231+
archiveClassifier.set('sources')
230232
from sourceSets.main.allJava
231233
}
232234

233235
task javadocJar(type: Jar, dependsOn: javadoc) {
234-
classifier 'javadoc'
236+
archiveClassifier.set('javadoc')
235237
from javadoc.destinationDir
236238
}
237239

@@ -249,7 +251,9 @@ subprojects {
249251
}
250252
}
251253

252-
apply from: "${rootDir}/gradle/publications.gradle"
254+
if (compositeConsumer == null) {
255+
apply from: "${rootDir}/gradle/publications.gradle"
256+
}
253257

254258
buildScan {
255259
termsOfServiceUrl = 'https://gradle.com/terms-of-service'

rsocket-core/build.gradle

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ plugins {
1818
id 'java-library'
1919
id 'maven-publish'
2020
id 'signing'
21-
id 'io.morethan.jmhreport'
22-
id 'me.champeau.jmh'
23-
id 'io.github.reyerizo.gradle.jcstress'
21+
}
22+
23+
def compositeConsumer = System.getProperty("rsocket.java.composite.consumer")
24+
def includePerformancePlugins = compositeConsumer == null
25+
26+
if (includePerformancePlugins) {
27+
apply plugin: 'io.morethan.jmhreport'
28+
apply plugin: 'me.champeau.jmh'
29+
apply plugin: 'io.github.reyerizo.gradle.jcstress'
2430
}
2531

2632
dependencies {
@@ -40,15 +46,19 @@ dependencies {
4046
testRuntimeOnly 'ch.qos.logback:logback-classic'
4147
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
4248

43-
jcstressImplementation(project(":rsocket-test"))
44-
jcstressImplementation 'org.slf4j:slf4j-api'
45-
jcstressImplementation "ch.qos.logback:logback-classic"
46-
jcstressImplementation 'io.projectreactor:reactor-test'
49+
if (includePerformancePlugins) {
50+
jcstressImplementation(project(":rsocket-test"))
51+
jcstressImplementation 'org.slf4j:slf4j-api'
52+
jcstressImplementation "ch.qos.logback:logback-classic"
53+
jcstressImplementation 'io.projectreactor:reactor-test'
54+
}
4755
}
4856

49-
jcstress {
50-
mode = 'sanity' //sanity, quick, default, tough
51-
jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.16"
57+
if (includePerformancePlugins) {
58+
jcstress {
59+
mode = 'sanity' //sanity, quick, default, tough
60+
jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.16"
61+
}
5262
}
5363

5464
jar {

settings.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ plugins {
1919

2020
rootProject.name = 'rsocket-java'
2121

22+
def compositeConsumer = System.getProperty("rsocket.java.composite.consumer")
23+
def includeAuxiliaryProjects = compositeConsumer == null
24+
2225
include 'rsocket-core'
2326
include 'rsocket-load-balancer'
2427
include 'rsocket-micrometer'
@@ -27,8 +30,10 @@ include 'rsocket-transport-local'
2730
include 'rsocket-transport-netty'
2831
include 'rsocket-bom'
2932

30-
include 'rsocket-examples'
31-
include 'benchmarks'
33+
if (includeAuxiliaryProjects) {
34+
include 'rsocket-examples'
35+
include 'benchmarks'
36+
}
3237

3338

3439

@@ -38,4 +43,3 @@ gradleEnterprise {
3843
termsOfServiceAgree = 'yes'
3944
}
4045
}
41-

0 commit comments

Comments
 (0)