mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrating ReactInstanceDelegate to kotlin (#37259)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37259 I'm migrating the ReactInstanceDelegate interface to kotlin to start developping new api in kotlin bypass-github-export-checks changelog: [internal] internal Reviewed By: cortinico, philIip Differential Revision: D45507000 fbshipit-source-id: 893a04951c3d92a55f82c47617f4e7633737067b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d3fbcbb04d
commit
9ca68efeb4
-37
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridgeless;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.infer.annotation.ThreadSafe;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.bridge.JSBundleLoader;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.fabric.ReactNativeConfig;
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManager;
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate;
|
||||
import java.util.List;
|
||||
|
||||
@ThreadSafe
|
||||
public interface ReactInstanceDelegate {
|
||||
String getJSMainModulePath();
|
||||
|
||||
JSBundleLoader getJSBundleLoader(Context context);
|
||||
|
||||
BindingsInstaller getBindingsInstaller();
|
||||
|
||||
TurboModuleManagerDelegate getTurboModuleManagerDelegate(ReactApplicationContext context);
|
||||
|
||||
JSEngineInstance getJSEngineInstance(ReactApplicationContext context);
|
||||
|
||||
void handleInstanceException(Exception e);
|
||||
|
||||
ReactNativeConfig getReactNativeConfig(TurboModuleManager turboModuleManager);
|
||||
|
||||
List<ReactPackage> getReactPackages();
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridgeless
|
||||
|
||||
import android.content.Context
|
||||
import com.facebook.infer.annotation.ThreadSafe
|
||||
import com.facebook.react.ReactPackage
|
||||
import com.facebook.react.bridge.JSBundleLoader
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.fabric.ReactNativeConfig
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManager
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate
|
||||
|
||||
@ThreadSafe
|
||||
interface ReactInstanceDelegate {
|
||||
val jSMainModulePath: String
|
||||
|
||||
val bindingsInstaller: BindingsInstaller
|
||||
|
||||
val reactPackages: List<ReactPackage>
|
||||
|
||||
fun getJSBundleLoader(context: Context): JSBundleLoader
|
||||
|
||||
fun getTurboModuleManagerDelegate(context: ReactApplicationContext): TurboModuleManagerDelegate
|
||||
|
||||
fun getJSEngineInstance(context: ReactApplicationContext): JSEngineInstance
|
||||
|
||||
fun handleInstanceException(e: Exception)
|
||||
|
||||
fun getReactNativeConfig(turboModuleManager: TurboModuleManager): ReactNativeConfig
|
||||
}
|
||||
Reference in New Issue
Block a user