Move JSPackagerWebSocketClient and JSDebuggerWebSocketClient to react/devsupport module

Summary: This move lets us remove the dependency on okhttp3 from react/bridge. The classes I moved are all strictly related to dev support features and don't need to go into the core bridge module that gets shipped to production.

Reviewed By: AaaChiuuu

Differential Revision: D3698977

fbshipit-source-id: 6ba1517377061690cef289a544ec1622122cef85
This commit is contained in:
Don Yu 2016-08-11 09:47:37 -07:00 committed by Facebook Github Bot 9
parent 6e60b1763c
commit 031fe4d797
7 changed files with 6 additions and 10 deletions

View File

@ -26,11 +26,7 @@ android_library(
react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'),
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
react_native_dep('third-party/java/jackson:core'),
react_native_dep('third-party/java/jsr-305:jsr-305'),
react_native_dep('third-party/java/okhttp:okhttp3'),
react_native_dep('third-party/java/okhttp:okhttp3-ws'),
react_native_dep('third-party/java/okio:okio'),
react_native_target('java/com/facebook/react/common:common'),
],
visibility = [

View File

@ -7,6 +7,7 @@ android_library(
deps = [
react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
react_native_dep('third-party/java/jackson:core'),
react_native_dep('third-party/java/jsr-305:jsr-305'),
react_native_dep('third-party/java/okhttp:okhttp3'),
react_native_dep('third-party/java/okhttp:okhttp3-ws'),

View File

@ -15,7 +15,6 @@ import android.text.TextUtils;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.JSPackagerWebSocketClient;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.network.OkHttpCallUtil;

View File

@ -45,7 +45,6 @@ import com.facebook.react.bridge.JavaJSExecutor;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.WebsocketJavaScriptExecutor;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.ShakeDetector;
import com.facebook.react.common.futures.SimpleSettableFuture;

View File

@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react.bridge;
package com.facebook.react.devsupport;
import javax.annotation.Nullable;

View File

@ -6,7 +6,7 @@
* file in the same directory.
*/
package com.facebook.react.bridge;
package com.facebook.react.devsupport;
import javax.annotation.Nullable;

View File

@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react.bridge;
package com.facebook.react.devsupport;
import javax.annotation.Nullable;
@ -19,6 +19,7 @@ import android.os.Handler;
import android.os.Looper;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.JavaJSExecutor;
/**
* Executes JS remotely via the react nodejs server as a proxy to a browser on the host machine.
@ -40,7 +41,7 @@ public class WebsocketJavaScriptExecutor implements JavaJSExecutor {
}
private static class JSExecutorCallbackFuture implements
JSDebuggerWebSocketClient.JSDebuggerCallback {
JSDebuggerWebSocketClient.JSDebuggerCallback {
private final Semaphore mSemaphore = new Semaphore(0);
private @Nullable Throwable mCause;