Skip to content

Commit

Permalink
Merge pull request #6 from FutureMind/feature/rxjava3
Browse files Browse the repository at this point in the history
Feature/rxjava3
  • Loading branch information
micHar authored Jul 11, 2020
2 parents 4310975 + 7f6e857 commit 951a19e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions rxwebsocket/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ dependencies {

testImplementation "io.mockk:mockk:1.10.0"

implementation 'io.reactivex.rxjava2:rxjava:2.2.18'
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
implementation 'io.reactivex.rxjava3:rxjava:3.0.4'
implementation 'com.squareup.okhttp3:okhttp:4.7.2'
}

sourceCompatibility = "7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.futuremind.rxwebsocket

import io.reactivex.BackpressureStrategy.LATEST
import io.reactivex.Flowable
import io.reactivex.FlowableEmitter
import io.reactivex.processors.PublishProcessor
import io.reactivex.rxjava3.core.BackpressureStrategy.LATEST
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.FlowableEmitter
import io.reactivex.rxjava3.processors.PublishProcessor
import okhttp3.*
import okio.ByteString
import java.net.SocketException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.futuremind.rxwebsocket

import io.reactivex.Flowable
import io.reactivex.rxjava3.core.Flowable
import okhttp3.WebSocket
import okio.ByteString

Expand Down Expand Up @@ -30,6 +30,4 @@ sealed class SocketState {
fun messageFlowable() = messageFlowable
fun byteMessageFlowable() = byteMessageFlowable
}


}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.futuremind.rxwebsocket

import io.mockk.*
import io.reactivex.Completable
import io.reactivex.Flowable
import io.reactivex.rxjava3.core.Completable
import io.reactivex.rxjava3.core.Flowable
import okhttp3.*
import okio.ByteString
import okio.ByteString.Companion.encodeUtf8
Expand Down Expand Up @@ -204,7 +204,7 @@ class RxWebSocketTest {

mockWebSocketListener.onMessage(mockWebSocket, "abc".encodeUtf8())

testSubscriber.assertNever("abc")
testSubscriber.assertEmpty()

}

Expand All @@ -223,7 +223,7 @@ class RxWebSocketTest {

mockWebSocketListener.onMessage(mockWebSocket, "abc")

testSubscriber.assertNever("abc".encodeUtf8())
testSubscriber.assertEmpty()

}

Expand Down
8 changes: 4 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation project(":rxwebsocket")

implementation 'io.reactivex.rxjava2:rxjava:2.2.18'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
implementation 'io.reactivex.rxjava3:rxjava:3.0.4'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'com.squareup.okhttp3:okhttp:4.7.2'
implementation "androidx.activity:activity-ktx:1.1.0"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package com.futuremind.rxwebsocket
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.disposables.Disposable
import kotlinx.android.synthetic.main.activity_main.*


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.futuremind.rxwebsocket

import androidx.lifecycle.ViewModel
import io.reactivex.Flowable
import io.reactivex.processors.PublishProcessor
import io.reactivex.schedulers.Schedulers
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.processors.PublishProcessor
import io.reactivex.rxjava3.schedulers.Schedulers;

import okhttp3.OkHttpClient
import okhttp3.Request
import java.util.concurrent.TimeUnit
Expand Down

0 comments on commit 951a19e

Please sign in to comment.