Skip to content

Commit bd209a8

Browse files
mostroverkhovrobertroeser
authored andcommitted
* separate public and internal api (#31)
* update packages to *.kotlin.* * update readme & build files references to RSocket-kotlin * root source folder changed from java to kotlin * replace remaining java classes with kotlin ones
1 parent 185e469 commit bd209a8

File tree

136 files changed

+1791
-1656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1791
-1656
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ Also, metadata can be associated with stream or RSocket itself
2525

2626
```groovy
2727
dependencies {
28-
compile 'io.rsocket.android:rsocket-core:0.9-SNAPSHOT'
28+
compile 'io.rsocket.kotlin:rsocket-core:0.9-SNAPSHOT'
2929
}
3030
```
3131
### Transports
3232
`Netty` based Websockets and TCP transport (`Client` and `Server`)
3333
`OkHttp` based Websockets transport (`Client` only)
3434
```groovy
3535
dependencies {
36-
compile 'io.rsocket.android:rsocket-transport-netty:0.9-SNAPSHOT'
37-
compile 'io.rsocket.android:rsocket-transport-okhttp:0.9-SNAPSHOT'
36+
compile 'io.rsocket.kotlin:rsocket-transport-netty:0.9-SNAPSHOT'
37+
compile 'io.rsocket.kotlin:rsocket-transport-okhttp:0.9-SNAPSHOT'
3838
}
3939
```
4040
### Usage
@@ -51,16 +51,16 @@ Stream Metadata is optional
5151
val request = PayloadImpl.textPayload("data")
5252
```
5353
#### Interactions
54-
Fire and Forget
55-
`RSocket.fireAndForget(payload: Payload): Completable`
56-
Request-Response
57-
`RSocket.requestResponse(payload: Payload): Single<Payload>`
58-
Request-Stream
59-
`RSocket.requestStream(payload: Payload): Flowable<Payload>`
60-
Request-Channel
61-
`RSocket.requestChannel(payload: Publisher<Payload>): Flowable<Payload>`
62-
Metadata-Push
63-
`fun metadataPush(payload: Payload): Completable`
54+
Fire and Forget
55+
`RSocket.fireAndForget(payload: Payload): Completable`
56+
Request-Response
57+
`RSocket.requestResponse(payload: Payload): Single<Payload>`
58+
Request-Stream
59+
`RSocket.requestStream(payload: Payload): Flowable<Payload>`
60+
Request-Channel
61+
`RSocket.requestChannel(payload: Publisher<Payload>): Flowable<Payload>`
62+
Metadata-Push
63+
`fun metadataPush(payload: Payload): Completable`
6464

6565
#### Client
6666
Client is initiator of `Connections`

build.gradle

Lines changed: 56 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ subprojects {
2626
apply plugin: 'java-library'
2727
apply plugin: 'kotlin'
2828
apply plugin: 'maven-publish'
29-
apply plugin: 'com.jfrog.bintray'
30-
apply plugin: 'com.jfrog.artifactory'
3129

32-
group = 'io.rsocket.android'
30+
group = 'io.rsocket.kotlin'
3331
version = '0.9-SNAPSHOT'
3432

3533
task sourcesJar(type: Jar, dependsOn: classes) {
@@ -42,9 +40,6 @@ subprojects {
4240
from javadoc.destinationDir
4341
}
4442

45-
tasks.bintrayUpload.dependsOn tasks.jar, tasks.sourcesJar, tasks.javadocJar
46-
47-
// add javadoc/source jar tasks as artifacts
4843
artifacts {
4944
archives sourcesJar, javadocJar, jar
5045
}
@@ -82,81 +77,75 @@ subprojects {
8277
}
8378
}
8479
}
80+
}
8581

86-
artifactory {
87-
publish {
88-
contextUrl = 'https://oss.jfrog.org'
89-
90-
repository {
91-
repoKey = 'oss-snapshot-local'
92-
//The Artifactory repository key to publish to
93-
//when using oss.jfrog.org the credentials are from Bintray.
94-
// For local build we expect them to be found in
95-
//~/.gradle/gradle.properties, otherwise to be set in the build server
96-
// Conditionalize for the users who don't have bintray credentials setup
97-
if (project.hasProperty('bintrayUser')) {
98-
username = project.property('bintrayUser')
99-
password = project.property('bintrayKey')
82+
if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
83+
84+
subprojects {
85+
plugins.withId('com.jfrog.bintray') {
86+
bintray {
87+
user = project.property('bintrayUser')
88+
key = project.property('bintrayKey')
89+
90+
publications = ['maven']
91+
publish = true
92+
93+
pkg {
94+
repo = 'RSocket'
95+
name = 'rsocket-kotlin'
96+
licenses = ['Apache-2.0']
97+
98+
issueTrackerUrl = 'https://github.com/rsocket/rsocket-kotlin/issues'
99+
websiteUrl = 'https://github.com/rsocket/rsocket-kotlin'
100+
vcsUrl = 'https://github.com/rsocket/rsocket-kotlin.git'
101+
githubRepo = 'rsocket/rsocket-kotlin'
102+
githubReleaseNotesFile = 'README.md'
103+
104+
version {
105+
name = project.version
106+
released = new Date()
107+
vcsTag = project.version
108+
109+
gpg {
110+
sign = true
111+
}
112+
113+
mavenCentralSync {
114+
user = project.property('sonatypeUsername')
115+
password = project.property('sonatypePassword')
116+
}
117+
}
100118
}
101119
}
102120

103-
publications('mavenJava')
104-
105-
defaults {
106-
// Reference to Gradle publications defined in the build script.
107-
// This is how we tell the Artifactory Plugin which artifacts should be
108-
// published to Artifactory.
109-
publications('mavenJava')
110-
publishArtifacts = true
111-
}
121+
tasks.bintrayUpload.dependsOn tasks.jar, tasks.sourcesJar, tasks.javadocJar
112122
}
113-
}
114123

115-
artifactoryPublish {
116-
dependsOn jar
117-
}
124+
plugins.withId('com.jfrog.artifactory') {
125+
artifactory {
126+
publish {
127+
contextUrl = 'https://oss.jfrog.org'
118128

119-
bintray {
120-
if (project.hasProperty('bintrayUser')) {
121-
user = project.property('bintrayUser')
122-
key = project.property('bintrayKey')
123-
}
124-
publications = ['mavenJava']
125-
dryRun = false
126-
publish = true
127-
override = false
128-
pkg {
129-
repo = 'RSocket'
130-
name = 'rsocket-android'
131-
desc = 'RSocket'
132-
websiteUrl = 'https://github.com/rsocket/rsocket-android'
133-
issueTrackerUrl = 'https://github.com/rsocket/rsocket-android'
134-
vcsUrl = 'https://github.com/rsocket/rsocket-android.git'
135-
licenses = ['Apache-2.0']
136-
githubRepo = 'rsocket/rsocket-android' //Optional Github repository
137-
githubReleaseNotesFile = 'README.md' //Optional Github readme file
138-
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
139-
def sonatypeUsername = project.property('sonatypeUsername')
140-
def sonatypePassword = project.property('sonatypePassword')
141-
version {
142-
name = "v${project.version}"
143-
vcsTag = "${project.version}"
144-
mavenCentralSync {
145-
sync = false
146-
user = sonatypeUsername
147-
password = sonatypePassword
129+
repository {
130+
repoKey = 'oss-snapshot-local'
131+
username = project.property('bintrayUser')
132+
password = project.property('bintrayKey')
133+
}
134+
135+
defaults {
136+
publications('maven')
148137
}
149138
}
150139
}
140+
141+
artifactoryPublish {
142+
dependsOn jar
143+
}
151144
}
152145
}
153146
}
154147

155-
repositories {
156-
jcenter()
157-
}
158-
159-
description = 'RSocket-Android: stream oriented messaging passing with Reactive Stream semantics, for Android'
148+
description = 'RSocket-kotlin: Reactive Streams over network boundary with Kotlin/Rxjava'
160149

161150
buildScan {
162151
licenseAgreementUrl = 'https://gradle.com/terms-of-service'

rsocket-core/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
apply plugin: 'com.jfrog.bintray'
17+
apply plugin: 'com.jfrog.artifactory'
1618

1719
targetCompatibility = 1.7
1820
sourceCompatibility = 1.7

rsocket-core/src/main/java/io/rsocket/android/exceptions/Exceptions.kt

Lines changed: 0 additions & 43 deletions
This file was deleted.

rsocket-core/src/main/java/io/rsocket/android/frame/ErrorFrameFlyweight.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)