Skip to content

Commit 9ca68ef

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Migrating ReactInstanceDelegate to kotlin (#37259)
Summary: Pull Request resolved: #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
1 parent d3fbcbb commit 9ca68ef

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridgeless/ReactInstanceDelegate.java

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.react.bridgeless
9+
10+
import android.content.Context
11+
import com.facebook.infer.annotation.ThreadSafe
12+
import com.facebook.react.ReactPackage
13+
import com.facebook.react.bridge.JSBundleLoader
14+
import com.facebook.react.bridge.ReactApplicationContext
15+
import com.facebook.react.fabric.ReactNativeConfig
16+
import com.facebook.react.turbomodule.core.TurboModuleManager
17+
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate
18+
19+
@ThreadSafe
20+
interface ReactInstanceDelegate {
21+
val jSMainModulePath: String
22+
23+
val bindingsInstaller: BindingsInstaller
24+
25+
val reactPackages: List<ReactPackage>
26+
27+
fun getJSBundleLoader(context: Context): JSBundleLoader
28+
29+
fun getTurboModuleManagerDelegate(context: ReactApplicationContext): TurboModuleManagerDelegate
30+
31+
fun getJSEngineInstance(context: ReactApplicationContext): JSEngineInstance
32+
33+
fun handleInstanceException(e: Exception)
34+
35+
fun getReactNativeConfig(turboModuleManager: TurboModuleManager): ReactNativeConfig
36+
}

0 commit comments

Comments
 (0)