Skip to content

Commit 5864dfc

Browse files
authored
Bugfix/build (#54)
* fixes build and temporary use specific rsocket build with prioritization Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * bumps jdk version for osx build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * check osx build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * fixes build and temporary use specific rsocket build with prioritization Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * rollbacks xcode version Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * provides troubleshooting Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * uses older protob Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * use older xcode version Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tests Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * tries to fix build Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * bumps proper rsocket version Signed-off-by: Oleh Dokuka <shadowgun@i.ua> * updates xcode Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
1 parent 1653bb3 commit 5864dfc

File tree

25 files changed

+511
-606
lines changed

25 files changed

+511
-606
lines changed

.travis.yml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,38 @@ jobs:
77
os: linux
88
jdk: oraclejdk8
99
before_install:
10-
- wget https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz
11-
- tar -xzvf protobuf-cpp-3.6.1.tar.gz
12-
- pushd protobuf-3.6.1
13-
- ./configure --disable-shared && make && sudo make install
10+
- pushd $HOME
11+
- ls
12+
- ls ./protobuf-3.6.1
13+
- bash ./build/rsocket/rsocket-rpc-java/ci/install_protobuf.sh
1414
- popd
15+
- java -version
16+
- protoc --version
1517
script: "./ci/travis.sh"
1618
- stage: build
19+
language: cpp
20+
os: osx
21+
osx_image: xcode11.2
22+
compiler: clang
23+
before_install:
24+
- sudo rm -rf /Library/Java/JavaVirtualMachines/*
25+
- curl -OLJ https://api.adoptopenjdk.net/v1/openjdk8/releases/x64_mac/latest/binary
26+
- tar -xzf OpenJDK8_x64_Mac_jdk*.tar.gz
27+
- sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-8.jdk
28+
- sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents
29+
- sudo mv jdk8* /Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents/Home
30+
- ls /Library/Java/JavaVirtualMachines/openjdk-8.jdk
31+
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents/Home
32+
- brew uninstall --ignore-dependencies protobuf
33+
- pushd $HOME
34+
- ls
35+
- ls ./protobuf-3.6.1
36+
- bash ./build/rsocket/rsocket-rpc-java/ci/install_protobuf.sh
37+
- popd
38+
- java -version
39+
- protoc --version
40+
script: "./ci/travis.sh"
41+
- stage: deploy
1742
language: cpp
1843
os: windows
1944
filter_secrets: false
@@ -32,35 +57,13 @@ jobs:
3257
- cmake --build . --config Release --target install
3358
- popd
3459
script: "./ci/travis.sh"
35-
- stage: deploy
36-
language: cpp
37-
os: osx
38-
osx_image: xcode11.2
39-
jdk: openjdk8
40-
compiler: clang
41-
before_install:
42-
- curl -OLJ https://api.adoptopenjdk.net/v1/openjdk8/releases/x64_mac/latest/binary
43-
- tar -xzf OpenJDK8_x64_Mac_jdk*.tar.gz
44-
- sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-8.jdk
45-
- sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents
46-
- sudo mv jdk8* /Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents/Home
47-
- sudo rm -rf /Library/Java/JavaVirtualMachines/openjdk-13*
48-
- ls /Library/Java/JavaVirtualMachines/openjdk-8.jdk
49-
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents/Home
50-
- java -version
51-
- curl -O -L https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz
52-
- tar -xzf protobuf-cpp-3.6.1.tar.gz
53-
- pushd protobuf-3.6.1
54-
- ./autogen.sh
55-
- ./configure --disable-shared && make && sudo make install
56-
- popd
57-
script: "./ci/travis.sh"
5860
before_cache:
5961
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
6062
notifications:
6163
email: false
6264
cache:
6365
directories:
66+
- "$HOME/protobuf-3.6.1/"
6467
- "$HOME/.gradle/caches/"
6568
- "$HOME/.gradle/wrapper/"
6669
- "$HOME/.m2"

artifactory.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
2323
contextUrl = 'https://oss.jfrog.org'
2424

2525
repository {
26-
repoKey = version.contains('SNAPSHOT') ? 'oss-snapshot-local' : 'oss-release-local'
26+
repoKey = 'oss-snapshot-local'
2727

2828
// Credentials for oss.jfrog.org are a user's Bintray credentials
2929
username = project.property('bintrayUser')

build.gradle

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
plugins {
2-
id 'com.gradle.build-scan' version '2.1'
32
id 'com.google.osdetector' version '1.4.0'
43
id 'com.github.sherter.google-java-format' version '0.8' apply false
5-
id 'com.github.johnrengelman.shadow' version '4.0.2' apply false
6-
id 'com.jfrog.artifactory' version '4.7.3' apply false
4+
id 'com.github.johnrengelman.shadow' version '5.2.0' apply false
5+
id 'com.jfrog.artifactory' version '4.11.0' apply false
76
id 'com.jfrog.bintray' version '1.8.4' apply false
8-
id 'me.champeau.gradle.jmh' version '0.4.8' apply false
7+
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
98
id 'io.morethan.jmhreport' version '0.9.0' apply false
109
id 'com.google.protobuf' version '0.8.10' apply false
10+
id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply false
1111
}
1212

1313
apply from: 'artifactory.gradle'
@@ -25,35 +25,27 @@ subprojects {
2525
apply plugin: 'java-library'
2626
apply plugin: 'com.github.sherter.google-java-format'
2727

28-
apply plugin: 'maven'
2928
apply plugin: 'maven-publish'
3029

3130
apply plugin: 'com.jfrog.artifactory'
3231
apply plugin: 'com.jfrog.bintray'
3332

33+
apply from: "${project.rootDir}/dependencies-managment.gradle"
34+
3435
sourceCompatibility = 1.8
3536
targetCompatibility = 1.8
3637

37-
ext['reactor-bom.version'] = 'Dysprosium-RELEASE'
38-
ext['rsocket.version'] = '1.0.0-RC5'
39-
ext['graphql.version'] = '11.0'
40-
ext['protobuf.version'] = '3.6.1'
41-
ext['log4j.version'] = '2.12.1'
42-
ext['slf4j.version'] = '1.7.29'
43-
ext['junit.version'] = '5.4.0'
44-
ext['mockito.version'] = '2.23.0'
45-
ext['hamcrest.version'] = '1.3'
46-
ext['jmh.version'] = '1.21'
47-
ext['micrometer.version'] = '1.0.6'
48-
ext['assertj.version'] = '3.11.1'
49-
ext['opentracing.version'] = '0.31.0'
50-
ext['opentracing.brave.version'] = '0.33.10'
51-
ext['zipkin.sender.version'] = '2.8.0'
52-
ext['hdrhistogram.version'] = '2.1.10'
38+
ext {
39+
if (project.hasProperty('versionSuffix')) {
40+
project.version += project.getProperty('versionSuffix')
41+
}
42+
}
5343

5444
repositories {
45+
mavenLocal()
46+
maven { url 'https://oss.jfrog.org/oss-snapshot-local' }
5547
mavenCentral()
56-
if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
48+
if (version.endsWith('SNAPSHOT') || project.hasProperty('platformVersion')) {
5749
maven { url 'http://repo.spring.io/libs-snapshot' }
5850
maven { url 'https://oss.jfrog.org/oss-snapshot-local' }
5951
}

ci/install_protobuf.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
DIR=./protobuf-3.6.1
4+
5+
if [ ! -d "$DIR" ] || [ ! "$(ls -A $DIR)" ]; then
6+
echo 'install protobuf from scratch'
7+
curl -O -L https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz
8+
tar -xzvf protobuf-cpp-3.6.1.tar.gz
9+
pushd protobuf-3.6.1 || exit
10+
./autogen.sh
11+
./configure --disable-shared && make && sudo make install
12+
popd || exit
13+
else
14+
echo 'install protobuf from cache'
15+
pushd protobuf-3.6.1 || exit
16+
sudo make install
17+
popd || exit
18+
fi

ci/travis.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,31 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
44

55
echo -e "Building PR #$TRAVIS_PULL_REQUEST [$TRAVIS_PULL_REQUEST_SLUG/$TRAVIS_PULL_REQUEST_BRANCH => $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH]"
66
./gradlew \
7-
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
7+
-PversionSuffix="-SNAPSHOT" \
8+
-PvcProtobufLibs="/c/Program Files/protobuf/lib" \
9+
-PvcProtobufInclude="/c/Program Files/protobuf/include" \
810
build
911

12+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] && [ "$TRAVIS_BRANCH" == "master" ] ; then
13+
14+
echo -e "Building Master Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
15+
./gradlew \
16+
-PversionSuffix="-SNAPSHOT" \
17+
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
18+
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
19+
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
20+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
21+
build artifactoryPublish --stacktrace
22+
1023
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ] && [ "$bintrayUser" != "" ] ; then
1124

12-
echo -e "Building Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH"
25+
echo -e "Building Branch Snapshot $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER"
1326
./gradlew \
27+
-PversionSuffix="-${TRAVIS_BRANCH//\//-}-SNAPSHOT" \
1428
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
1529
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
1630
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
31+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
1732
build artifactoryPublish --stacktrace
1833

1934
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$bintrayUser" != "" ] ; then
@@ -24,12 +39,14 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$bin
2439
-PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" \
2540
-PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" \
2641
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
42+
-PbuildNumber="$TRAVIS_BUILD_NUMBER" \
2743
build bintrayUpload --stacktrace
2844

2945
else
3046

3147
echo -e "Building $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH"
3248
./gradlew \
49+
-PversionSuffix="-SNAPSHOT" \
3350
-PvcProtobufLibs="/c/Program Files/protobuf/lib" -PvcProtobufInclude="/c/Program Files/protobuf/include" \
3451
build
3552

dependencies-managment.gradle

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apply plugin: 'io.spring.dependency-management'
2+
3+
dependencyManagement {
4+
imports {
5+
mavenBom "io.projectreactor:reactor-bom:$reactorBomVersion"
6+
mavenBom "io.rsocket:rsocket-bom:$rsocketVersion"
7+
mavenBom "org.junit:junit-bom:$junitVersion"
8+
mavenBom "com.google.protobuf:protobuf-bom:$protobufVersion"
9+
}
10+
11+
dependencies {
12+
dependency "javax.inject:javax.inject:1"
13+
dependency "javax.annotation:javax.annotation-api:1.2"
14+
15+
dependency "com.google.protobuf:protoc:3.6.1"
16+
17+
dependencySet(group: 'org.apache.logging.log4j', version: log4jVersion) {
18+
entry "log4j-api"
19+
entry "log4j-core"
20+
entry "log4j-slf4j-impl"
21+
}
22+
23+
dependency "org.slf4j:slf4j-api:$slf4jVersion"
24+
dependency "org.slf4j:slf4j-simple:$slf4jVersion"
25+
26+
dependency "io.micrometer:micrometer-core:$micrometerVersion"
27+
dependency "io.opentracing:opentracing-api:$opentracingVersion"
28+
dependency "io.opentracing.brave:brave-opentracing:$opentracingBraveVersion"
29+
dependency "io.zipkin.reporter2:zipkin-sender-okhttp3:$zipkinSenderVersion"
30+
31+
// TODO: Remove after JUnit5 migration
32+
// TEST DEPENDENCIES
33+
34+
dependency 'junit:junit:4.12'
35+
36+
dependency "org.mockito:mockito-core:$mockitoVersion"
37+
dependency "org.hamcrest:hamcrest-library:$hamcrestVersion"
38+
dependency "org.assertj:assertj-core:$assertjVersion"
39+
dependency "org.hdrhistogram:HdrHistogram:$hdrhistogramVersion"
40+
41+
dependencySet(group: 'org.openjdk.jmh', version: jmhVersion) {
42+
entry 'jmh-core'
43+
entry 'jmh-generator-annprocess'
44+
}
45+
}
46+
}

gradle.properties

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
21
group=io.rsocket.rpc
3-
version=0.2.20-SNAPSHOT
2+
version=0.3.0
3+
4+
reactorBomVersion=Dysprosium-RELEASE
5+
rsocketVersion=1.0.0-RC6-SNAPSHOT
6+
graphqlVersion=11.0
7+
protobufVersion=3.7.1
8+
log4jVersion=2.12.1
9+
slf4jVersion=1.7.29
10+
junitVersion=5.4.0
11+
mockitoVersion=2.23.0
12+
hamcrestVersion=1.3
13+
jmhVersion=1.21
14+
micrometerVersion=1.0.6
15+
assertjVersion=3.11.1
16+
opentracingVersion=0.31.0
17+
opentracingBraveVersion=0.33.10
18+
zipkinSenderVersion=2.8.0
19+
hdrhistogramVersion=2.1.10

gradle/wrapper/gradle-wrapper.jar

1.17 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
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.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
5-
zipStorePath=wrapper/dists
5+
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"`

0 commit comments

Comments
 (0)