Skip to content

Commit

Permalink
Adding support for custom C++ TM wrapper to CxxReactPackage (facebook…
Browse files Browse the repository at this point in the history
…#46822)

Summary:
Modifying the CxxReactPackage by changing the annotation from UnstableReactNativeAPI to FrameworkAPI so as to now support custom C++ TM wrapper

Changelog:
[Android][Changed] - Modify CxxReactPackage to support custom C++ TM wrapper

Reviewed By: shwanton, christophpurrer

Differential Revision: D63740964
  • Loading branch information
arushikesarwani94 authored and facebook-github-bot committed Oct 7, 2024
1 parent 86d92e4 commit ea7d6f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,10 @@ public final class com/facebook/react/runtime/ReactSurfaceView : com/facebook/re
public fun setIsFabric (Z)V
}

public abstract class com/facebook/react/runtime/cxxreactpackage/CxxReactPackage {
protected fun <init> (Lcom/facebook/jni/HybridData;)V
}

public final class com/facebook/react/runtime/hermes/HermesInstance : com/facebook/react/runtime/JSRuntimeFactory {
public static final field Companion Lcom/facebook/react/runtime/hermes/HermesInstance$Companion;
public fun <init> ()V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ package com.facebook.react.runtime.cxxreactpackage

import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.common.annotations.FrameworkAPI

/** CxxReactPackage is used to register C++ Turbo Modules with React Native. */
@UnstableReactNativeAPI
@OptIn(FrameworkAPI::class)
public abstract class CxxReactPackage protected constructor(hybridData: HybridData?) {

@DoNotStrip @Suppress("NoHungarianNotation") private var mHybridData: HybridData? = hybridData
Expand Down

0 comments on commit ea7d6f0

Please sign in to comment.