Remove SalesforceReact (moved to SalesforceMobileSDK-ReactNative)#2904
Merged
wmathurin merged 17 commits intoMay 27, 2026
Conversation
The libs.versions.toml had a TODO note about updating react-android in a dedicated work item; this is the right work item. - gradle/libs.versions.toml: react-android 0.79.3 -> 0.81.5 - libs/SalesforceReact/build.gradle.kts: removed the TODO comment Verified: ./gradlew :libs:SalesforceReact:assembleDebug succeeds. Note on remaining Android work for new architecture: the Java bridge modules (SalesforceOauthReactBridge, etc.) use @ReactMethod with separate success and error callbacks. Under new architecture interop mode, RN can wrap legacy @ReactMethod modules without code changes. Switching the test app to new architecture requires migrating its ReactNativeHost to DefaultReactNativeHost; that is best handled as a follow-up.
…d into rn-migration
…d into rn-migration
- Convert all 4 bridge modules from Java to Kotlin - Add TurboModule interface to all bridges - Unify callback pattern: single callback(error, result) matching iOS - Update SalesforceReactActivity for single-callback pattern - Update ReactBridgeHelper with invokeSuccess/invokeError methods - Add kotlin jvmToolchain(17) to build.gradle.kts - Update architecture documentation
NOTE: This must be reverted before merging to dev.
In bridgeless/new architecture mode, modules registered via plain ReactPackage.createNativeModules() are not discoverable through TurboModuleRegistry. Switch to BaseReactPackage with getModule() and ReactModuleInfoProvider so modules are found by name.
BaseReactPackage approach didn't work at runtime. Reverting to plain ReactPackage with createNativeModules(). Since our modules implement TurboModule, the RN interop layer should make them available via TurboModuleRegistry.get() automatically.
Create a proper Kotlin class for the package registration to ensure BaseReactPackage is recognized by ReactPackageTurboModuleManagerDelegate in bridgeless new architecture mode.
SalesforceReact Android bridge code now lives in the react-native-force npm package (SalesforceMobileSDK-ReactNative/android/). This enables proper React Native autolinking for TurboModule discovery in new architecture bridgeless mode. Removed: - libs/SalesforceReact/ (source, resources, config) - libs/test/SalesforceReactTest/ (test classes, assets) - .github/test-shards/SalesforceReact.json - React Native section from install.sh - SalesforceReact include from settings.gradle.kts - JSC maven repos from settings.gradle.kts - SalesforceReact from dokka in build.gradle.kts
Generated by 🚫 Danger |
Contributor
Author
|
Test failure for SalesforceReact is normal (the code and tests are gone, but CI runs using the action defined in the base branch - for security reason). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2904 +/- ##
============================================
- Coverage 55.08% 55.07% -0.02%
+ Complexity 2509 2507 -2
============================================
Files 226 226
Lines 17774 17774
Branches 2327 2327
============================================
- Hits 9791 9789 -2
- Misses 6979 6980 +1
- Partials 1004 1005 +1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes all React Native code from this repo. The Android bridge modules, activity, SDK manager, tests, and CI have moved to
SalesforceMobileSDK-ReactNative/android/.Why
React Native 0.81.5's New Architecture (bridgeless mode) requires native modules to be discovered through the autolinking system, which generates C++ JNI wrappers at build time. Autolinking only works for code that lives inside the
react-native-forcenpm package — modules in a separate repo included via Gradle composite build fail the TurboModule JNI classloader check at runtime. Moving the bridge code into the npm package (alongside the iOS bridge) solves this and also simplifies the cross-repo development workflow.Changes
Removed
libs/SalesforceReact/— All source, resources, config, manifestlibs/test/SalesforceReactTest/— Test classes, resources, assets.github/test-shards/SalesforceReact.json— Test sharding configinstall.shandinstall.vbsSalesforceReactinclude fromsettings.gradle.ktssettings.gradle.ktsSalesforceReactfrom dokka inbuild.gradle.ktsUpdated
CLAUDE.md— Removed SalesforceReact from library architecturedocs/salesforcereact/— Added "MOVED" notices pointing to ReactNative repoRelated PRs
Test Plan
./gradlew buildpasses without SalesforceReact