diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..fd050e36 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,21 @@ +version: 2 + +jobs: + build: + docker: + - image: circleci/android:api-27-alpha + environment: + TERM: dumb + GRADLE_OPTS: '-Dorg.gradle.jvmargs="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" -Dorg.gradle.parallel=false -Dorg.gradle.daemon=true' + CIRCLE_TEST_REPORTS: test-reports + resource_class: xlarge + parallelism: 4 + steps: + - checkout + - run: + name: Disable PreDexing + command: echo "disablePreDex" >> gradle.properties + - run: if [ -e ./gradlew ]; then ./gradlew dependencies;else gradle dependencies;fi + - run: ./gradlew test + - run: mkdir -p $CIRCLE_TEST_REPORTS/junit/ + - run: find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; diff --git a/README.md b/README.md index 398c48e2..8d2a5301 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,36 @@ Scarlet === +[![CircleCI](https://circleci.com/gh/Tinder/Scarlet.svg?style=svg)](https://circleci.com/gh/Tinder/Scarlet) +[![Release](https://jitpack.io/v/tinder/scarlet.svg)](https://jitpack.io/#tinder/scarlet) A Retrofit inspired WebSocket client for Kotlin, Java, and Android. -This README is still **WIP**. Please see the [tutorial][tutorial] for more information. - Tutorial --- - [Taming WebSocket with Scarlet][tutorial] +- [A talk][slides] at [Conference for Kotliners][kotliners] Usage --- -In this example, we are reading the realtime Bitcoin price from [Gdax WebSocket Feed][gdax-websocket-feed]. +In this example, we read the realtime Bitcoin price from [Gdax WebSocket Feed][gdax-websocket-feed]. For more information, please check out the [demo app][demo-app]. -Declare a WebSocket client using an interface. +Declare a WebSocket client using an interface: ~~~ kotlin interface GdaxService { + @Receive + fun observeOnConnectionOpenedEvent(): Flowable> @Send fun sendSubscribe(subscribe: Subscribe) @Receive fun observeTicker(): Flowable - @Receive - fun observeOnConnectionOpenedEvent(): Flowable> } -val gdaxService = scarlet.create() ~~~ -Use Scarlet to create an implementation. +Use Scarlet to create an implementation: ~~~ kotlin -val okHttpClient = OkHttpClient.Builder().build() - val scarletInstance = Scarlet.Builder() .webSocketFactory(okHttpClient.newWebSocketFactory("wss://ws-feed.gdax.com")) .addMessageAdapterFactory(MoshiMessageAdapter.Factory()) @@ -42,7 +40,9 @@ val scarletInstance = Scarlet.Builder() val gdaxService = scarletInstance.create() ~~~ -Send a `Subscribe` message upon connection open so that the server will start streaming tickers, which contain the latest price. +Send a `Subscribe` message upon connection open and the server will start streaming tickers which contain the latest price. + + ~~~ kotlin val BITCOIN_TICKER_SUBSCRIBE_MESSAGE = Subscribe( productIds = listOf("BTC-USD"), @@ -53,64 +53,72 @@ gdaxService.observeOnConnectionOpenedEvent() .subscribe({ gdaxService.sendSubscribe(BITCOIN_TICKER_SUBSCRIBE_MESSAGE) }) -~~~ -Start observing realtime tickers. -~~~ kotlin gdaxService.observeTicker() .subscribe({ ticker -> Log.d("Bitcoin price is ${ticker.price} at ${ticker.time}") }) ~~~ -### Built-in Plugins -`WebSocket.Factory` -- `OkHttpClient` -- `MockHttpServer` - -`MessageAdapter.Factory` -- moshi -- gson -- protobuf - -`StreamAdapter.Factory` -- RxJava2 -- RxJava1 - -`Lifecycle` -- AndroidLifecycle - -`BackoffStrategy` -- Linear -- Exponential -- ExponentialWithJitter +### Android +Scarlet is driven by a [StateMachine](https://github.com/Tinder/StateMachine). -### Android -TODO: -- `AndroidLifecycle` + - -### State Machine -Scarlet is driven by a [StateMachine](https://github.com/Tinder/StateMachine). -![State Diagram](./example/scarlet-state-machine.png) +TODO Download -------- -**TODO: make the jar public** +While we are working on Bintray support, Scarlet is available via [JitPack](jitpack). -Download [the latest JAR][latest-jar] or grab via Maven: +##### Maven: ```xml + + jitpack.io + https://jitpack.io + - com.tinder.scarlet - scarlet - 0.1.0 + com.github.tinder.scarlet + scarlet + 0.1.3 ``` -or Gradle: + +##### Gradle: ```groovy -implementation 'com.tinder.scarlet:scarlet:0.1.0' +repositories { + // ... + maven { url "https://jitpack.io" } +} + +implementation 'com.github.tinder.scarlet:scarlet:0.1.2' ``` +### Plug-in Roadmap +`WebSocket.Factory` +- [x] `OkHttpClient` +- [x] `MockHttpServer` + +`MessageAdapter.Factory` +- [x] `moshi` +- [x] `gson` +- [x] `protobuf` +- [ ] `jackson` +- [ ] `simple-xml` + +`StreamAdapter.Factory` +- [x] `RxJava2` +- [x] `RxJava1` +- [x] `Kotlin Coroutine` + +`Lifecycle` +- [x] `AndroidLifecycle` + +`BackoffStrategy` +- [x] `Linear` +- [x] `Exponential` +- [x] `ExponentialWithJitter` + Copyright --- ~~~ @@ -142,5 +150,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [gdax-websocket-feed]: https://docs.gdax.com/#websocket-feed [latest-jar]: https://tinder.jfrog.io/tinder/webapp/#/artifacts/browse/tree/General/libs-release-local/com/tinder/scarlet/scarlet - [demo-app]: https://github.com/Tinder/Scarlet/tree/master/demo/src/main/java/com/tinder/app + [demo-app]: /demo/src/main/java/com/tinder/app [tutorial]: https://tech.gotinder.com/taming-websocket-with-scarlet/ + [slides]: https://speakerdeck.com/zhxnlai/taming-websocket-with-scarlet + [kotliners]:https://www.conferenceforkotliners.com/ + [jitpack]: https://jitpack.io/ diff --git a/build.gradle b/build.gradle index f1ec1b90..a8fd5e4c 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,8 @@ ktlint { subprojects { apply plugin: 'org.kordamp.gradle.stats' apply plugin: "com.jfrog.artifactory" - group = 'com.tinder.scarlet' + // group = 'com.tinder.scarlet' TODO use Bintray + group = 'com.github.tinder' repositories { google() diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index ce97b0d2..b6cadabd 100755 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ diff --git a/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 4b776554..176e2843 100755 --- a/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,6 +1,6 @@ diff --git a/demo/src/main/res/values/colors.xml b/demo/src/main/res/values/colors.xml index 496c74c6..eab0c52a 100755 --- a/demo/src/main/res/values/colors.xml +++ b/demo/src/main/res/values/colors.xml @@ -1,6 +1,6 @@ diff --git a/demo/src/main/res/values/dimens.xml b/demo/src/main/res/values/dimens.xml index a92b8340..3e761681 100644 --- a/demo/src/main/res/values/dimens.xml +++ b/demo/src/main/res/values/dimens.xml @@ -1,6 +1,6 @@ diff --git a/demo/src/main/res/values/strings.xml b/demo/src/main/res/values/strings.xml index ebd1197e..8e09dfe4 100755 --- a/demo/src/main/res/values/strings.xml +++ b/demo/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ diff --git a/demo/src/main/res/values/styles.xml b/demo/src/main/res/values/styles.xml index 796cf1ae..34343ba1 100755 --- a/demo/src/main/res/values/styles.xml +++ b/demo/src/main/res/values/styles.xml @@ -1,5 +1,5 @@ diff --git a/dependencies.gradle b/dependencies.gradle index 87031947..5f757027 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -19,6 +19,8 @@ ext { rxAndroid = 'io.reactivex.rxjava2:rxandroid:2.0.1' rxKotlin = 'io.reactivex.rxjava2:rxkotlin:2.1.0' rxJava1 = 'io.reactivex:rxjava:1.3.4' + kotlinCoroutines = 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.3' + kotlinCoroutinesRxInterop = 'org.jetbrains.kotlinx:kotlinx-coroutines-reactive:0.23.3' stetho = 'com.facebook.stetho:stetho:1.5.0' stethoOkHttp = 'com.facebook.stetho:stetho-okhttp3:1.5.0' diff --git a/gradle.properties b/gradle.properties index de55ab65..a482420b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=0.1.0 +version=0.1.1 diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..7ce70da2 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,4 @@ +jdk: + - oraclejdk8 +install: + - ./publish-jitpack.sh diff --git a/publish-jitpack.sh b/publish-jitpack.sh new file mode 100755 index 00000000..17d1c71e --- /dev/null +++ b/publish-jitpack.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +./gradlew clean + +./gradlew scarlet-core:build scarlet-core:publishToMavenLocal + +./gradlew scarlet-core-internal:build scarlet-core-internal:publishToMavenLocal + +./gradlew state-machine:build state-machine:publishToMavenLocal + +./gradlew scarlet:build scarlet:publishToMavenLocal + +./gradlew scarlet-test-utils:build scarlet-test-utils:publishToMavenLocal + +./gradlew scarlet-message-adapter-builtin:build scarlet-message-adapter-builtin:publishToMavenLocal + +./gradlew scarlet-message-adapter-protobuf:build scarlet-message-adapter-protobuf:publishToMavenLocal + +./gradlew scarlet-message-adapter-moshi:build scarlet-message-adapter-moshi:publishToMavenLocal + +./gradlew scarlet-message-adapter-gson:build scarlet-message-adapter-gson:publishToMavenLocal + +./gradlew scarlet-stream-adapter-builtin:build scarlet-stream-adapter-builtin:publishToMavenLocal + +./gradlew scarlet-stream-adapter-rxjava2:build scarlet-stream-adapter-rxjava2:publishToMavenLocal + +./gradlew scarlet-stream-adapter-rxjava:build scarlet-stream-adapter-rxjava:publishToMavenLocal + +./gradlew scarlet-stream-adapter-coroutines:build scarlet-stream-adapter-coroutines:publishToMavenLocal + +./gradlew scarlet-websocket-okhttp:build scarlet-websocket-okhttp:publishToMavenLocal + +./gradlew scarlet-websocket-mockwebserver:build scarlet-websocket-mockwebserver:publishToMavenLocal + +./gradlew scarlet-lifecycle-android:assemble scarlet-lifecycle-android:generatePomFileForAarPublication +./gradlew scarlet-lifecycle-android:publishToMavenLocal diff --git a/publish.sh b/publish.sh index da301066..8901706a 100755 --- a/publish.sh +++ b/publish.sh @@ -17,12 +17,20 @@ ./gradlew scarlet-message-adapter-builtin:build scarlet-message-adapter-builtin:artifactoryPublish +./gradlew scarlet-message-adapter-gson:build scarlet-message-adapter-gson:artifactoryPublish + +./gradlew scarlet-message-adapter-moshi:build scarlet-message-adapter-moshi:artifactoryPublish + ./gradlew scarlet-message-adapter-protobuf:build scarlet-message-adapter-protobuf:artifactoryPublish ./gradlew scarlet-stream-adapter-builtin:build scarlet-stream-adapter-builtin:artifactoryPublish +./gradlew scarlet-stream-adapter-rxjava:build scarlet-stream-adapter-rxjava:artifactoryPublish + ./gradlew scarlet-stream-adapter-rxjava2:build scarlet-stream-adapter-rxjava2:artifactoryPublish +./gradlew scarlet-stream-adapter-coroutines:build scarlet-stream-adapter-coroutines:artifactoryPublish + ./gradlew scarlet-websocket-okhttp:build scarlet-websocket-okhttp:artifactoryPublish ./gradlew scarlet-websocket-mockwebserver:build scarlet-websocket-mockwebserver:artifactoryPublish diff --git a/scarlet-core-internal/build.gradle b/scarlet-core-internal/build.gradle index 04341c7f..98ab8041 100644 --- a/scarlet-core-internal/build.gradle +++ b/scarlet-core-internal/build.gradle @@ -27,7 +27,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/EmptyStreamObserver.kt b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/EmptyStreamObserver.kt index 7a4dfb58..6127a1ae 100644 --- a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/EmptyStreamObserver.kt +++ b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/EmptyStreamObserver.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.utils diff --git a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableStream.kt b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableStream.kt index 52e227c0..1cc810c2 100644 --- a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableStream.kt +++ b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableStream.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.utils diff --git a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableUtils.kt b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableUtils.kt index f9c735bd..c36de72c 100644 --- a/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableUtils.kt +++ b/scarlet-core-internal/src/main/java/com/tinder/scarlet/utils/FlowableUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ @file:JvmName("FlowableUtils") diff --git a/scarlet-core-internal/src/test/java/com/tinder/scarlet/utils/FlowableStreamTest.kt b/scarlet-core-internal/src/test/java/com/tinder/scarlet/utils/FlowableStreamTest.kt index 776e7dc1..80f79631 100644 --- a/scarlet-core-internal/src/test/java/com/tinder/scarlet/utils/FlowableStreamTest.kt +++ b/scarlet-core-internal/src/test/java/com/tinder/scarlet/utils/FlowableStreamTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.utils diff --git a/scarlet-core/build.gradle b/scarlet-core/build.gradle index 86813d44..3de8323a 100644 --- a/scarlet-core/build.gradle +++ b/scarlet-core/build.gradle @@ -38,7 +38,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/Deserialization.kt b/scarlet-core/src/main/java/com/tinder/scarlet/Deserialization.kt index 23e7c480..421d2717 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/Deserialization.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/Deserialization.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/Lifecycle.kt b/scarlet-core/src/main/java/com/tinder/scarlet/Lifecycle.kt index 5e12311b..88386e78 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/Lifecycle.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/Lifecycle.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/Message.kt b/scarlet-core/src/main/java/com/tinder/scarlet/Message.kt index aa751d0e..2fe20369 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/Message.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/Message.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/MessageAdapter.kt b/scarlet-core/src/main/java/com/tinder/scarlet/MessageAdapter.kt index 9fe7dab4..5a72ce1a 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/MessageAdapter.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/MessageAdapter.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/ShutdownReason.kt b/scarlet-core/src/main/java/com/tinder/scarlet/ShutdownReason.kt index 7f8f89f5..3434ac21 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/ShutdownReason.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/ShutdownReason.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/Stream.kt b/scarlet-core/src/main/java/com/tinder/scarlet/Stream.kt index b3a16d60..2db6dc94 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/Stream.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/Stream.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/StreamAdapter.kt b/scarlet-core/src/main/java/com/tinder/scarlet/StreamAdapter.kt index 270a02eb..320e176b 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/StreamAdapter.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/StreamAdapter.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/WebSocket.kt b/scarlet-core/src/main/java/com/tinder/scarlet/WebSocket.kt index eabe896f..d7f6ec91 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/WebSocket.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/WebSocket.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/utils/TypeUtils.kt b/scarlet-core/src/main/java/com/tinder/scarlet/utils/TypeUtils.kt index e302d2ed..1c130124 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/utils/TypeUtils.kt +++ b/scarlet-core/src/main/java/com/tinder/scarlet/utils/TypeUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ @file:JvmName("TypeUtils") diff --git a/scarlet-core/src/main/java/com/tinder/scarlet/utils/Utils.java b/scarlet-core/src/main/java/com/tinder/scarlet/utils/Utils.java index cdf74d50..2073db34 100644 --- a/scarlet-core/src/main/java/com/tinder/scarlet/utils/Utils.java +++ b/scarlet-core/src/main/java/com/tinder/scarlet/utils/Utils.java @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ /* diff --git a/scarlet-core/src/test/java/com/tinder/scarlet/utils/TypeUtilsTest.kt b/scarlet-core/src/test/java/com/tinder/scarlet/utils/TypeUtilsTest.kt index 4b4b7194..25d3c698 100644 --- a/scarlet-core/src/test/java/com/tinder/scarlet/utils/TypeUtilsTest.kt +++ b/scarlet-core/src/test/java/com/tinder/scarlet/utils/TypeUtilsTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.utils diff --git a/scarlet-lifecycle-android/build.gradle b/scarlet-lifecycle-android/build.gradle index 124d5168..80acb44c 100755 --- a/scarlet-lifecycle-android/build.gradle +++ b/scarlet-lifecycle-android/build.gradle @@ -63,7 +63,7 @@ task sourcesJar(type: Jar) { publishing { publications { aar(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() diff --git a/scarlet-lifecycle-android/src/main/AndroidManifest.xml b/scarlet-lifecycle-android/src/main/AndroidManifest.xml index 4e2a5928..a9871764 100755 --- a/scarlet-lifecycle-android/src/main/AndroidManifest.xml +++ b/scarlet-lifecycle-android/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ { + return when (type.getRawType()) { + ReceiveChannel::class.java -> ReceiveChannelStreamAdapter() + else -> throw IllegalArgumentException() + } + } +} \ No newline at end of file diff --git a/scarlet-stream-adapter-coroutines/src/main/java/com/tinder/streamadapter/coroutines/ReceiveChannelStreamAdapter.kt b/scarlet-stream-adapter-coroutines/src/main/java/com/tinder/streamadapter/coroutines/ReceiveChannelStreamAdapter.kt new file mode 100644 index 00000000..0cbe36be --- /dev/null +++ b/scarlet-stream-adapter-coroutines/src/main/java/com/tinder/streamadapter/coroutines/ReceiveChannelStreamAdapter.kt @@ -0,0 +1,15 @@ +/* + * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + */ + +package com.tinder.streamadapter.coroutines + +import com.tinder.scarlet.Stream +import com.tinder.scarlet.StreamAdapter +import kotlinx.coroutines.experimental.channels.ReceiveChannel +import kotlinx.coroutines.experimental.reactive.openSubscription + +class ReceiveChannelStreamAdapter : StreamAdapter> { + + override fun adapt(stream: Stream) = stream.openSubscription() +} \ No newline at end of file diff --git a/scarlet-stream-adapter-coroutines/src/test/java/com/tinder/scarlet/streamadapter/coroutines/ReceiveChannelTest.kt b/scarlet-stream-adapter-coroutines/src/test/java/com/tinder/scarlet/streamadapter/coroutines/ReceiveChannelTest.kt new file mode 100644 index 00000000..e39d44aa --- /dev/null +++ b/scarlet-stream-adapter-coroutines/src/test/java/com/tinder/scarlet/streamadapter/coroutines/ReceiveChannelTest.kt @@ -0,0 +1,152 @@ +/* + * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + */ + +package com.tinder.scarlet.streamadapter.coroutines + +import com.tinder.scarlet.Lifecycle +import com.tinder.scarlet.Scarlet +import com.tinder.scarlet.Stream +import com.tinder.scarlet.WebSocket +import com.tinder.scarlet.lifecycle.LifecycleRegistry +import com.tinder.scarlet.testutils.TestStreamObserver +import com.tinder.scarlet.testutils.any +import com.tinder.scarlet.testutils.test +import com.tinder.scarlet.testutils.containingText +import com.tinder.scarlet.testutils.containingBytes +import com.tinder.scarlet.websocket.mockwebserver.newWebSocketFactory +import com.tinder.scarlet.websocket.okhttp.newWebSocketFactory +import com.tinder.scarlet.ws.Receive +import com.tinder.scarlet.ws.Send +import com.tinder.streamadapter.coroutines.CoroutinesStreamAdapterFactory +import kotlinx.coroutines.experimental.runBlocking +import kotlinx.coroutines.experimental.channels.ReceiveChannel +import okhttp3.OkHttpClient +import okhttp3.mockwebserver.MockWebServer +import org.assertj.core.api.Assertions.assertThat +import org.junit.Rule +import org.junit.Test +import java.util.concurrent.TimeUnit + +class ReceiveChannelTest { + + @get:Rule + private val mockWebServer = MockWebServer() + private val serverUrlString by lazy { mockWebServer.url("/").toString() } + + private val serverLifecycleRegistry = LifecycleRegistry() + private lateinit var server: Service + private lateinit var serverEventObserver: TestStreamObserver + + private val clientLifecycleRegistry = LifecycleRegistry() + private lateinit var client: Service + private lateinit var clientEventObserver: TestStreamObserver + + @Test + fun send_givenConnectionIsEstablished_shouldBeReceivedByTheServer() { + // Given + givenConnectionIsEstablished() + val textMessage1 = "Hello" + val textMessage2 = "Hi" + val bytesMessage1 = "Yo".toByteArray() + val bytesMessage2 = "Sup".toByteArray() + val testTextChannel = server.observeText() + val testBytesChannel = server.observeBytes() + + // When + client.sendText(textMessage1) + val isSendTextSuccessful = client.sendTextAndConfirm(textMessage2) + client.sendBytes(bytesMessage1) + val isSendBytesSuccessful = client.sendBytesAndConfirm(bytesMessage2) + + // Then + assertThat(isSendTextSuccessful).isTrue() + assertThat(isSendBytesSuccessful).isTrue() + + serverEventObserver.awaitValues( + any>(), + any().containingText(textMessage1), + any().containingText(textMessage2), + any().containingBytes(bytesMessage1), + any().containingBytes(bytesMessage2) + ) + + runBlocking { + assertThat(testTextChannel.receiveOrNull()).isEqualTo(textMessage1) + assertThat(testTextChannel.receiveOrNull()).isEqualTo(textMessage2) + + assertThat(testBytesChannel.receiveOrNull()).isEqualTo(bytesMessage1) + assertThat(testBytesChannel.receiveOrNull()).isEqualTo(bytesMessage2) + } + } + + private fun givenConnectionIsEstablished() { + createClientAndServer() + serverLifecycleRegistry.onNext(Lifecycle.State.Started) + clientLifecycleRegistry.onNext(Lifecycle.State.Started) + blockUntilConnectionIsEstablish() + } + + private fun createClientAndServer() { + server = createServer() + serverEventObserver = server.observeEvents().test() + client = createClient() + clientEventObserver = client.observeEvents().test() + } + + private fun createServer(): Service { + val webSocketFactory = mockWebServer.newWebSocketFactory() + val scarlet = Scarlet.Builder() + .webSocketFactory(webSocketFactory) + .lifecycle(serverLifecycleRegistry) + .addStreamAdapterFactory(CoroutinesStreamAdapterFactory()) + .build() + return scarlet.create() + } + + private fun createClient(): Service { + val okHttpClient = OkHttpClient.Builder() + .writeTimeout(500, TimeUnit.MILLISECONDS) + .readTimeout(500, TimeUnit.MILLISECONDS) + .build() + val webSocketFactory = okHttpClient.newWebSocketFactory(serverUrlString) + val scarlet = Scarlet.Builder() + .webSocketFactory(webSocketFactory) + .lifecycle(clientLifecycleRegistry) + .addStreamAdapterFactory(CoroutinesStreamAdapterFactory()) + .build() + return scarlet.create() + } + + private fun blockUntilConnectionIsEstablish() { + clientEventObserver.awaitValues( + any>() + ) + serverEventObserver.awaitValues( + any>() + ) + } + + private interface Service { + @Receive + fun observeEvents(): Stream + + @Receive + fun observeText(): ReceiveChannel + + @Receive + fun observeBytes(): ReceiveChannel + + @Send + fun sendText(message: String) + + @Send + fun sendTextAndConfirm(message: String): Boolean + + @Send + fun sendBytes(message: ByteArray) + + @Send + fun sendBytesAndConfirm(message: ByteArray): Boolean + } +} \ No newline at end of file diff --git a/scarlet-stream-adapter-rxjava/build.gradle b/scarlet-stream-adapter-rxjava/build.gradle index f4fbd2b7..1145c482 100755 --- a/scarlet-stream-adapter-rxjava/build.gradle +++ b/scarlet-stream-adapter-rxjava/build.gradle @@ -45,7 +45,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/ObservableStreamAdapter.kt b/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/ObservableStreamAdapter.kt index 5f660619..874feb7d 100644 --- a/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/ObservableStreamAdapter.kt +++ b/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/ObservableStreamAdapter.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava diff --git a/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/RxJavaStreamAdapterFactory.kt b/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/RxJavaStreamAdapterFactory.kt index 86a824ca..92bcaee0 100755 --- a/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/RxJavaStreamAdapterFactory.kt +++ b/scarlet-stream-adapter-rxjava/src/main/java/com/tinder/scarlet/streamadapter/rxjava/RxJavaStreamAdapterFactory.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava diff --git a/scarlet-stream-adapter-rxjava/src/test/java/com/tinder/scarlet/streamadapter/rxjava/ObservableTest.kt b/scarlet-stream-adapter-rxjava/src/test/java/com/tinder/scarlet/streamadapter/rxjava/ObservableTest.kt index 6a1d2520..66c847fe 100644 --- a/scarlet-stream-adapter-rxjava/src/test/java/com/tinder/scarlet/streamadapter/rxjava/ObservableTest.kt +++ b/scarlet-stream-adapter-rxjava/src/test/java/com/tinder/scarlet/streamadapter/rxjava/ObservableTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava diff --git a/scarlet-stream-adapter-rxjava2/build.gradle b/scarlet-stream-adapter-rxjava2/build.gradle index 97754282..52f79154 100755 --- a/scarlet-stream-adapter-rxjava2/build.gradle +++ b/scarlet-stream-adapter-rxjava2/build.gradle @@ -45,7 +45,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableStreamAdapter.kt b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableStreamAdapter.kt index 12c2333b..b903d7ff 100644 --- a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableStreamAdapter.kt +++ b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableStreamAdapter.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava2 diff --git a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableStreamAdapter.kt b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableStreamAdapter.kt index 5fd5b725..51c20fb5 100644 --- a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableStreamAdapter.kt +++ b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableStreamAdapter.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava2 diff --git a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/RxJava2StreamAdapterFactory.kt b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/RxJava2StreamAdapterFactory.kt index 82e3ce18..cc871daf 100755 --- a/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/RxJava2StreamAdapterFactory.kt +++ b/scarlet-stream-adapter-rxjava2/src/main/java/com/tinder/scarlet/streamadapter/rxjava2/RxJava2StreamAdapterFactory.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava2 diff --git a/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableTest.kt b/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableTest.kt index e245fcde..c4d18b9f 100644 --- a/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableTest.kt +++ b/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/FlowableTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava2 diff --git a/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableTest.kt b/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableTest.kt index 07d89dc6..9cc0361a 100644 --- a/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableTest.kt +++ b/scarlet-stream-adapter-rxjava2/src/test/java/com/tinder/scarlet/streamadapter/rxjava2/ObservableTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.streamadapter.rxjava2 diff --git a/scarlet-test-utils/build.gradle b/scarlet-test-utils/build.gradle index d633d7f0..9d7ae68b 100644 --- a/scarlet-test-utils/build.gradle +++ b/scarlet-test-utils/build.gradle @@ -37,7 +37,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestStreamObserver.kt b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestStreamObserver.kt index 77caa35c..0057baf5 100644 --- a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestStreamObserver.kt +++ b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestStreamObserver.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.testutils diff --git a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestUtils.kt b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestUtils.kt index ff7d5760..7869e661 100644 --- a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestUtils.kt +++ b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/TestUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ @file:JvmName("TestUtils") diff --git a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/ValueAssert.kt b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/ValueAssert.kt index 0967072b..478b1705 100644 --- a/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/ValueAssert.kt +++ b/scarlet-test-utils/src/main/java/com/tinder/scarlet/testutils/ValueAssert.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.testutils diff --git a/scarlet-websocket-mockwebserver/build.gradle b/scarlet-websocket-mockwebserver/build.gradle index b0c22ae0..d6ab5691 100644 --- a/scarlet-websocket-mockwebserver/build.gradle +++ b/scarlet-websocket-mockwebserver/build.gradle @@ -36,7 +36,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerOkHttpWebSocketConnectionEstablisher.kt b/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerOkHttpWebSocketConnectionEstablisher.kt index f1f3bd85..b6bff575 100644 --- a/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerOkHttpWebSocketConnectionEstablisher.kt +++ b/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerOkHttpWebSocketConnectionEstablisher.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.mockwebserver diff --git a/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerUtils.kt b/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerUtils.kt index a89762a3..d471df33 100644 --- a/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerUtils.kt +++ b/scarlet-websocket-mockwebserver/src/main/java/com/tinder/scarlet/websocket/mockwebserver/MockWebServerUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ @file:JvmName("MockWebServerUtils") diff --git a/scarlet-websocket-okhttp/build.gradle b/scarlet-websocket-okhttp/build.gradle index 0b5940ed..af62581d 100644 --- a/scarlet-websocket-okhttp/build.gradle +++ b/scarlet-websocket-okhttp/build.gradle @@ -47,7 +47,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientUtils.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientUtils.kt index 03c58c2a..c28d7c8a 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientUtils.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ @file:JvmName("OkHttpClientUtils") diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientWebSocketConnectionEstablisher.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientWebSocketConnectionEstablisher.kt index 69bb565f..f0a864f2 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientWebSocketConnectionEstablisher.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpClientWebSocketConnectionEstablisher.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocket.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocket.kt index ddfd1890..0b1cd9dc 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocket.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocket.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt index cbc5154e..1e3e3bb8 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserver.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolder.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolder.kt index 604fe1de..f98f3e52 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolder.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolder.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/RequestFactory.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/RequestFactory.kt index e9942a2d..6bbe4fb0 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/RequestFactory.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/RequestFactory.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp.request diff --git a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactory.kt b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactory.kt index ff0adf5b..71ab2fcb 100644 --- a/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactory.kt +++ b/scarlet-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactory.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp.request diff --git a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserverTest.kt b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserverTest.kt index 55bf570a..782cda3b 100644 --- a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserverTest.kt +++ b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketEventObserverTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolderTest.kt b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolderTest.kt index b2df9dea..cebd341b 100644 --- a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolderTest.kt +++ b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketHolderTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketIntegrationTest.kt b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketIntegrationTest.kt index 6c4c5089..c588f207 100644 --- a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketIntegrationTest.kt +++ b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketIntegrationTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketTest.kt b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketTest.kt index 8c43ab7e..41be8553 100644 --- a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketTest.kt +++ b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp diff --git a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactoryTest.kt b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactoryTest.kt index 6ab17ace..1fa676e9 100644 --- a/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactoryTest.kt +++ b/scarlet-websocket-okhttp/src/test/java/com/tinder/scarlet/websocket/okhttp/request/StaticUrlRequestFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.websocket.okhttp.request diff --git a/scarlet/build.gradle b/scarlet/build.gradle index f8895ec9..fc05b06c 100644 --- a/scarlet/build.gradle +++ b/scarlet/build.gradle @@ -53,7 +53,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/scarlet/src/main/java/com/tinder/scarlet/Event.kt b/scarlet/src/main/java/com/tinder/scarlet/Event.kt index ae94a77e..dc3dfdf6 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/Event.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/Event.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet/src/main/java/com/tinder/scarlet/Scarlet.kt b/scarlet/src/main/java/com/tinder/scarlet/Scarlet.kt index f84a164f..1801e277 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/Scarlet.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/Scarlet.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet/src/main/java/com/tinder/scarlet/Session.kt b/scarlet/src/main/java/com/tinder/scarlet/Session.kt index 50fdc1d3..fe9770aa 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/Session.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/Session.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet/src/main/java/com/tinder/scarlet/State.kt b/scarlet/src/main/java/com/tinder/scarlet/State.kt index 52501699..ecd4dd1f 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/State.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/State.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/Service.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/Service.kt index 001ca584..bc9f8f5d 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/Service.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/Service.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt index dd61f9d5..f5cde9f7 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/Connection.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/LifecycleStateSubscriber.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/LifecycleStateSubscriber.kt index 09a0dfad..97744896 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/LifecycleStateSubscriber.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/LifecycleStateSubscriber.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection.subscriber diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/RetryTimerSubscriber.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/RetryTimerSubscriber.kt index 146a2994..6f13eab7 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/RetryTimerSubscriber.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/RetryTimerSubscriber.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection.subscriber diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/WebSocketEventSubscriber.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/WebSocketEventSubscriber.kt index fcf17908..83751be4 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/WebSocketEventSubscriber.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/connection/subscriber/WebSocketEventSubscriber.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection.subscriber diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/EventMapper.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/EventMapper.kt index 233f9ffb..81f60058 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/EventMapper.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/EventMapper.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolver.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolver.kt index 34e3bbd5..f5141b95 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolver.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolver.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethod.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethod.kt index 16dce50a..21ba9cbb 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethod.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethod.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutor.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutor.kt index 71a08ae0..bd3decc6 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutor.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutor.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolver.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolver.kt index bc58d0eb..26b358f8 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolver.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolver.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/main/java/com/tinder/scarlet/internal/utils/RuntimePlatform.kt b/scarlet/src/main/java/com/tinder/scarlet/internal/utils/RuntimePlatform.kt index 1600f086..990d51b7 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/internal/utils/RuntimePlatform.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/internal/utils/RuntimePlatform.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.utils diff --git a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/DefaultLifecycle.kt b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/DefaultLifecycle.kt index 081e66a3..3e9e1f28 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/DefaultLifecycle.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/DefaultLifecycle.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/FlowableLifecycle.kt b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/FlowableLifecycle.kt index f065820d..6cd969fa 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/FlowableLifecycle.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/FlowableLifecycle.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleRegistry.kt b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleRegistry.kt index 3a4b8962..c3796b97 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleRegistry.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleRegistry.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleStateUtils.kt b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleStateUtils.kt index 9168aedc..bb8e13f2 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleStateUtils.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/lifecycle/LifecycleStateUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/main/java/com/tinder/scarlet/retry/BackoffStrategy.kt b/scarlet/src/main/java/com/tinder/scarlet/retry/BackoffStrategy.kt index 70c36d69..065089ac 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/retry/BackoffStrategy.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/retry/BackoffStrategy.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialBackoffStrategy.kt b/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialBackoffStrategy.kt index 98eeac82..41e8c0d4 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialBackoffStrategy.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialBackoffStrategy.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialWithJitterBackoffStrategy.kt b/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialWithJitterBackoffStrategy.kt index 707adb3a..bdb0a7b0 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialWithJitterBackoffStrategy.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/retry/ExponentialWithJitterBackoffStrategy.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/main/java/com/tinder/scarlet/retry/LinearBackoffStrategy.kt b/scarlet/src/main/java/com/tinder/scarlet/retry/LinearBackoffStrategy.kt index 8c8792bd..2f4bfb76 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/retry/LinearBackoffStrategy.kt +++ b/scarlet/src/main/java/com/tinder/scarlet/retry/LinearBackoffStrategy.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/main/java/com/tinder/scarlet/ws/Receive.java b/scarlet/src/main/java/com/tinder/scarlet/ws/Receive.java index 7895f172..16b84bbb 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/ws/Receive.java +++ b/scarlet/src/main/java/com/tinder/scarlet/ws/Receive.java @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.ws; diff --git a/scarlet/src/main/java/com/tinder/scarlet/ws/Send.java b/scarlet/src/main/java/com/tinder/scarlet/ws/Send.java index 68f1d419..31f1739d 100644 --- a/scarlet/src/main/java/com/tinder/scarlet/ws/Send.java +++ b/scarlet/src/main/java/com/tinder/scarlet/ws/Send.java @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.ws; diff --git a/scarlet/src/test/java/com/tinder/scarlet/ScarletTest.kt b/scarlet/src/test/java/com/tinder/scarlet/ScarletTest.kt index b262b9eb..a98ae049 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/ScarletTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/ScarletTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceFactoryTest.kt index 730c74fc..b13a98d0 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceTest.kt index a3884803..7940b0f0 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/ServiceTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionFactoryTest.kt index cb938f1f..3b1e6d40 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionStateManagerTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionStateManagerTest.kt index 2720d05c..b9a2bab4 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionStateManagerTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionStateManagerTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionTest.kt index c6defdbe..f1191c6a 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/ConnectionTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/LifecycleStateSubscriberTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/LifecycleStateSubscriberTest.kt index 88e7aaa3..9866550c 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/LifecycleStateSubscriberTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/LifecycleStateSubscriberTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/RetryTimerSubscriberTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/RetryTimerSubscriberTest.kt index 0b9a5c42..e0c9b40c 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/RetryTimerSubscriberTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/RetryTimerSubscriberTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/WebSocketEventSubscriberTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/WebSocketEventSubscriberTest.kt index ef12033d..cb66da34 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/connection/WebSocketEventSubscriberTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/connection/WebSocketEventSubscriberTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.connection diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperFactoryTest.kt index a254eaa1..30441816 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperTest.kt index 359ff57d..0dc59bd7 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/EventMapperTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolverTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolverTest.kt index 5db8ab7b..5941a8a2 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolverTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/MessageAdapterResolverTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodFactoryTest.kt index c1f21e17..2fa6a222 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodTest.kt index d7177dca..13a161a7 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ReceiveServiceMethodTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodFactoryTest.kt index fc3ef966..b10d1fd9 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodTest.kt index c1a584a2..0eda7ec4 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/SendServiceMethodTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorFactoryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorFactoryTest.kt index ad351c4e..a1b7c66f 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorFactoryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorFactoryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorTest.kt index eaa690ab..2c9151f7 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/ServiceMethodExecutorTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolverTest.kt b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolverTest.kt index 21d2bfa4..e007ccfa 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolverTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/internal/servicemethod/StreamAdapterResolverTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.internal.servicemethod diff --git a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/DefaultLifecycleTest.kt b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/DefaultLifecycleTest.kt index 8a9cdd64..e77b21ce 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/DefaultLifecycleTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/DefaultLifecycleTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/FlowableLifecycleTest.kt b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/FlowableLifecycleTest.kt index b05d6046..168a9c79 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/FlowableLifecycleTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/FlowableLifecycleTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryBackpressureTest.kt b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryBackpressureTest.kt index a0dd7fbd..6cd2925f 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryBackpressureTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryBackpressureTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryTest.kt b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryTest.kt index a290454b..35887334 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/lifecycle/LifecycleRegistryTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.lifecycle diff --git a/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffStrategyTest.kt b/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffStrategyTest.kt index 32ede508..1846bd06 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffStrategyTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffStrategyTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffWithJitterBackoffStrategyTest.kt b/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffWithJitterBackoffStrategyTest.kt index f715be06..6823114b 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffWithJitterBackoffStrategyTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/retry/ExponentialBackoffWithJitterBackoffStrategyTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/test/java/com/tinder/scarlet/retry/LinearBackoffStrategyTest.kt b/scarlet/src/test/java/com/tinder/scarlet/retry/LinearBackoffStrategyTest.kt index 69965386..0d852d9e 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/retry/LinearBackoffStrategyTest.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/retry/LinearBackoffStrategyTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.retry diff --git a/scarlet/src/test/java/com/tinder/scarlet/utils/ClassUtils.kt b/scarlet/src/test/java/com/tinder/scarlet/utils/ClassUtils.kt index 04902690..3096cd99 100644 --- a/scarlet/src/test/java/com/tinder/scarlet/utils/ClassUtils.kt +++ b/scarlet/src/test/java/com/tinder/scarlet/utils/ClassUtils.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.scarlet.utils diff --git a/settings.gradle b/settings.gradle index 083d08d2..a2d468d9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,5 +12,6 @@ include ':scarlet-message-adapter-protobuf' include ':scarlet-message-adapter-gson' include ':scarlet-stream-adapter-rxjava' include ':scarlet-stream-adapter-rxjava2' +include ':scarlet-stream-adapter-coroutines' include ':scarlet-lifecycle-android' include ':demo' diff --git a/state-machine/build.gradle b/state-machine/build.gradle index a48f0bb1..f82245db 100644 --- a/state-machine/build.gradle +++ b/state-machine/build.gradle @@ -23,7 +23,7 @@ artifacts { publishing { publications { mavenJava(MavenPublication) { - groupId 'com.tinder.scarlet' + groupId 'com.tinder' version version artifactId project.getName() artifact sourcesJar diff --git a/state-machine/src/main/java/com/tinder/statemachine/StateMachine.kt b/state-machine/src/main/java/com/tinder/statemachine/StateMachine.kt index 33372f52..31abaca1 100644 --- a/state-machine/src/main/java/com/tinder/statemachine/StateMachine.kt +++ b/state-machine/src/main/java/com/tinder/statemachine/StateMachine.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.statemachine diff --git a/state-machine/src/test/java/com/tinder/statemachine/StateMachineTest.kt b/state-machine/src/test/java/com/tinder/statemachine/StateMachineTest.kt index f8f11e21..82835f47 100644 --- a/state-machine/src/test/java/com/tinder/statemachine/StateMachineTest.kt +++ b/state-machine/src/test/java/com/tinder/statemachine/StateMachineTest.kt @@ -1,5 +1,5 @@ /* - * © 2013 - 2018 Tinder, Inc., ALL RIGHTS RESERVED + * © 2018 Match Group, LLC. */ package com.tinder.statemachine