Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@

#include <DefaultComponentsRegistry.h>
#include <DefaultTurboModuleManagerDelegate.h>
#if __has_include("<autolinking.h>")
#define AUTOLINKING_AVAILABLE 1
#include <autolinking.h>
#else
#define AUTOLINKING_AVAILABLE 0
#endif
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <rncore.h>
Expand All @@ -61,10 +56,8 @@ void registerComponents(
REACT_NATIVE_APP_COMPONENT_REGISTRATION(registry);
#endif

#if AUTOLINKING_AVAILABLE
// And we fallback to the components autolinked
autolinking_registerProviders(registry);
#endif
}

std::shared_ptr<TurboModule> cxxModuleProvider(
Expand All @@ -78,10 +71,8 @@ std::shared_ptr<TurboModule> cxxModuleProvider(
// return std::make_shared<NativeCxxModuleExample>(jsInvoker);
// }

#if AUTOLINKING_AVAILABLE
// And we fallback to the CXX module providers autolinked
return autolinking_cxxModuleProvider(name, jsInvoker);
#endif

return nullptr;
}
Expand Down Expand Up @@ -112,12 +103,10 @@ std::shared_ptr<TurboModule> javaModuleProvider(
return module;
}

#if AUTOLINKING_AVAILABLE
// And we fallback to the module providers autolinked
if (auto module = autolinking_ModuleProvider(name, params)) {
return module;
}
#endif

return nullptr;
}
Expand Down