Upgrade of React-Native and Dependencies for Gradle 8 and Kotlin 1.8.0 Compatibility #174
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.
Problem Statement
We encountered a significant integration issue with the Intercom Android SDK due to discrepancies in the Gradle and Kotlin versions used across different components of our react-native project. Specifically, the Intercom Android SDK had been updated to utilise Gradle 8 and Kotlin 1.9.0. In contrast, our react-native project was still operating on older versions (Gradle 3.4.2 for the library project and Gradle 7 for the Sandbox app). This version mismatch prevented the Sandbox application from compiling, thereby hindering our customers' ability to test and integrate react-native SDK effectively.
Implemented Solution
To address these compatibility issues and ensure a smooth integration process for our customers, a comprehensive upgrade of our react-native environment and its dependencies. The updates are as follows:
React-Native Version Upgrade: Updated to React-Native version 0.73.4, ensuring full compatibility with the latest Gradle and Kotlin versions.
Gradle Scripts and Dependencies Update: Modified Gradle scripts and updated dependencies to align with Gradle 8 and Kotlin 1.8.0 requirements. These changes included the elimination of redundant and deprecated code, as well as updates to import statements to match the new library versions.
Simplification of Build Variants: Removed previously existing build variants, such as the fossDebug variant. Going forward, the project will only support debug and release variants, streamlining the build process.
Steps to run the project
Once the Metro bundler is running, you can launch the application on Android by pressing "a" or on iOS by pressing "i".
Note: If the build fails in your existing project setup, try deleting the
node_modules
folder fromintercom-react-native
andexample
directories and re-run the above steps.To facilitate a seamless transition to the updated project setup, we need to update the scripts and documentation to include the above commands for setting up and running the project.