Skip to content

Commit 1c41b1b

Browse files
committed
provides build number for PRs (#724)
* provides build number for PRs Signed-off-by: Oleh Dokuka <[email protected]> * updates jdk-12 to jdk-13 build Signed-off-by: Oleh Dokuka <[email protected]> * updates to gradle 6+ Signed-off-by: Oleh Dokuka <[email protected]> * fixes issues related to migration to gradle 6 Signed-off-by: Oleh Dokuka <[email protected]> * provides formatting Signed-off-by: Oleh Dokuka <[email protected]>
1 parent f9fa09a commit 1c41b1b

File tree

11 files changed

+83
-31
lines changed

11 files changed

+83
-31
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ matrix:
2323
- jdk: openjdk8
2424
- jdk: openjdk11
2525
env: SKIP_RELEASE=true
26-
- jdk: openjdk12
26+
- jdk: openjdk13
2727
env: SKIP_RELEASE=true
2828

2929
env:

build.gradle

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515
*/
1616

1717
plugins {
18-
id 'com.gradle.build-scan' version '2.4.2'
19-
2018
id 'com.github.sherter.google-java-format' version '0.8' apply false
21-
id 'com.jfrog.artifactory' version '4.9.10' apply false
19+
id 'com.jfrog.artifactory' version '4.11.0' apply false
2220
id 'com.jfrog.bintray' version '1.8.4' apply false
23-
id 'me.champeau.gradle.jmh' version '0.4.8' apply false
24-
id 'io.spring.dependency-management' version '1.0.7.RELEASE' apply false
21+
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
22+
id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply false
2523
id 'io.morethan.jmhreport' version '0.9.0' apply false
2624
}
2725

@@ -35,7 +33,7 @@ subprojects {
3533
ext['netty-bom.version'] = '4.1.37.Final'
3634
ext['netty-boringssl.version'] = '2.0.25.Final'
3735
ext['hdrhistogram.version'] = '2.1.10'
38-
ext['mockito.version'] = '2.25.1'
36+
ext['mockito.version'] = '3.2.0'
3937
ext['slf4j.version'] = '1.7.25'
4038
ext['jmh.version'] = '1.21'
4139
ext['junit.version'] = '5.5.2'
@@ -145,7 +143,6 @@ subprojects {
145143
}
146144
}
147145
}
148-
149146
}
150147

151148
apply from: "${rootDir}/gradle/publications.gradle"

ci/travis.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
55
echo -e "Building PR #$TRAVIS_PULL_REQUEST [$TRAVIS_PULL_REQUEST_SLUG/$TRAVIS_PULL_REQUEST_BRANCH => $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH]"
66
./gradlew build
77

8-
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] ; then
8+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] && [ "$TRAVIS_BRANCH" == "develop" ] ; then
99

10-
echo -e "Building Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH"
10+
echo -e "Building Develop Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
1111
./gradlew \
1212
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
1313
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
1414
-PversionSuffix="-SNAPSHOT" \
15+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
16+
build artifactoryPublish --stacktrace
17+
18+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] ; then
19+
20+
echo -e "Building Branch Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
21+
./gradlew \
22+
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
23+
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
24+
-PversionSuffix="-$TRAVIS_BRANCH-SNAPSHOT" \
25+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
1526
build artifactoryPublish --stacktrace
1627

1728
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$bintrayUser" != "" ] ; then
@@ -21,6 +32,7 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$bin
2132
-Pversion="$TRAVIS_TAG" \
2233
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
2334
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
35+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
2436
build bintrayUpload --stacktrace
2537

2638
else

gradle/artifactory.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
3333
defaults {
3434
publications(publishing.publications.maven)
3535
}
36+
37+
if (project.hasProperty('buildNumber')) {
38+
clientConfig.info.setBuildNumber(project.property('buildNumber').toString())
39+
}
3640
}
3741
}
3842
tasks.named("artifactoryPublish").configure {

gradle/wrapper/gradle-wrapper.jar

-561 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
109125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110126
fi
111127

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
128+
# For Cygwin or MSYS, switch paths to Windows format before running java
129+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116132
JAVACMD=`cygpath --unix "$JAVACMD"`

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

rsocket-bom/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ publishing {
3434
publications {
3535
maven(MavenPublication) {
3636
from components.javaPlatform
37-
// remove scope information from published BOM
38-
pom.withXml {
39-
asNode().dependencyManagement.first().dependencies.first().each {
40-
it.remove(it.scope.first())
41-
}
42-
}
4337
}
4438
}
4539
}

rsocket-core/src/main/java/io/rsocket/DuplexConnection.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public interface DuplexConnection extends Availability, Closeable {
3030
* Sends the source of Frames on this connection and returns the {@code Publisher} representing
3131
* the result of this send.
3232
*
33-
* <h2>Flow control</h2>
33+
* <p><strong>Flow control</strong>
3434
*
35-
* The passed {@code Publisher} must
35+
* <p>The passed {@code Publisher} must
3636
*
3737
* @param frames Stream of {@code Frame}s to send on the connection.
3838
* @return {@code Publisher} that completes when all the frames are written on the connection
@@ -56,20 +56,20 @@ default Mono<Void> sendOne(ByteBuf frame) {
5656
/**
5757
* Returns a stream of all {@code Frame}s received on this connection.
5858
*
59-
* <h2>Completion</h2>
59+
* <p><strong>Completion</strong>
6060
*
61-
* Returned {@code Publisher} <em>MUST</em> never emit a completion event ({@link
61+
* <p>Returned {@code Publisher} <em>MUST</em> never emit a completion event ({@link
6262
* Subscriber#onComplete()}.
6363
*
64-
* <h2>Error</h2>
64+
* <p><strong>Error</strong>
6565
*
66-
* Returned {@code Publisher} can error with various transport errors. If the underlying physical
67-
* connection is closed by the peer, then the returned stream from here <em>MUST</em> emit an
68-
* {@link ClosedChannelException}.
66+
* <p>Returned {@code Publisher} can error with various transport errors. If the underlying
67+
* physical connection is closed by the peer, then the returned stream from here <em>MUST</em>
68+
* emit an {@link ClosedChannelException}.
6969
*
70-
* <h2>Multiple Subscriptions</h2>
70+
* <p><strong>Multiple Subscriptions</strong>
7171
*
72-
* Returned {@code Publisher} is not required to support multiple concurrent subscriptions.
72+
* <p>Returned {@code Publisher} is not required to support multiple concurrent subscriptions.
7373
* RSocket will never have multiple subscriptions to this source. Implementations <em>MUST</em>
7474
* emit an {@link IllegalStateException} for subsequent concurrent subscriptions, if they do not
7575
* support multiple concurrent subscriptions.

settings.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
plugins {
17+
id 'com.gradle.enterprise' version '3.1'
18+
}
1619

1720
rootProject.name = 'rsocket-java'
1821

@@ -26,3 +29,13 @@ include 'rsocket-bom'
2629

2730
include 'rsocket-examples'
2831
include 'benchmarks'
32+
33+
34+
35+
gradleEnterprise {
36+
buildScan {
37+
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
38+
termsOfServiceAgree = 'yes'
39+
}
40+
}
41+

0 commit comments

Comments
 (0)