Skip to content
Draft
Show file tree
Hide file tree
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
9 changes: 0 additions & 9 deletions android/app/src/debug/AndroidManifest.xml

This file was deleted.

1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="${usesCleartextTraffic}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for usesCleartextTraffic definition in all relevant Gradle files

echo "=== Checking gradle.properties files ==="
find . -name "gradle.properties" -type f | xargs grep -l "usesCleartextTraffic" 2>/dev/null || echo "Not found in gradle.properties"

echo -e "\n=== Checking build.gradle files ==="
find . -name "build.gradle*" -type f | xargs grep -n "usesCleartextTraffic" 2>/dev/null || echo "Not found in build.gradle"

echo -e "\n=== Checking AndroidManifest.xml ==="
find . -name "AndroidManifest.xml" -type f | xargs grep -n "usesCleartextTraffic" 2>/dev/null

echo -e "\n=== Checking build.gradle files for manifestPlaceholders ==="
find . -name "build.gradle*" -type f | xargs grep -n "manifestPlaceholders" 2>/dev/null || echo "Not found"

echo -e "\n=== Listing all gradle.properties files ==="
find . -name "gradle.properties" -type f

Repository: RocketChat/Rocket.Chat.ReactNative

Length of output: 596


🏁 Script executed:

#!/bin/bash
# Examine the build.gradle file around the manifestPlaceholders definition

echo "=== Full android/app/build.gradle snippet around manifestPlaceholders ==="
sed -n '85,105p' android/app/build.gradle

echo -e "\n=== Check entire defaultConfig block ==="
sed -n '/defaultConfig/,/}/p' android/app/build.gradle | head -50

Repository: RocketChat/Rocket.Chat.ReactNative

Length of output: 1441


Add usesCleartextTraffic to manifestPlaceholders in android/app/build.gradle.

The placeholder ${usesCleartextTraffic} is used in AndroidManifest.xml but is not defined in the manifestPlaceholders map. Update android/app/build.gradle line 95 to include this variable:

manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String, usesCleartextTraffic: "false"]

Without this definition, the build will fail or the placeholder will remain unexpanded in the manifest.

🤖 Prompt for AI Agents
In android/app/src/main/AndroidManifest.xml around line 31 the placeholder
${usesCleartextTraffic} is referenced but not defined; update
android/app/build.gradle (around line 95) to add usesCleartextTraffic to the
manifestPlaceholders map so the placeholder is defined (e.g., add
usesCleartextTraffic: "false" alongside the existing BugsnagAPIKey entry) and
re-run the build.

android:hardwareAccelerated="true"
tools:replace="android:allowBackup">
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import android.content.res.Configuration
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactInstanceEventListener
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage;
import com.bugsnag.android.Bugsnag
import expo.modules.ApplicationLifecycleDispatcher
Expand Down Expand Up @@ -61,15 +59,15 @@ open class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)

Bugsnag.start(this)

// Initialize MMKV encryption - reads existing key or generates new one
// Must run before React Native starts to avoid race conditions
MMKVKeyManager.initialize(this)

// Load the native entry point for the New Architecture
load()
loadReactNative(this)

// Register listener to set React context when initialized
reactHost.addReactInstanceEventListener(object : ReactInstanceEventListener {
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "35.0.0"
buildToolsVersion = "36.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
compileSdkVersion = 36
targetSdkVersion = 36
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
kotlinVersion = "2.1.20"
Comment on lines +3 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check React Native version in package.json
echo "=== React Native Version ==="
if [ -f "package.json" ]; then
  rg '"react-native":\s*"[^"]*"' package.json -o
else
  echo "package.json not found"
fi

# Check for Android-related configuration
echo -e "\n=== Android Configuration Files ==="
fd -e gradle . --max-depth 3 | head -20

Repository: RocketChat/Rocket.Chat.ReactNative

Length of output: 238


🌐 Web query:

Android SDK 36 release status and stability January 2026

💡 Result:

Short answer: As of January 4, 2026, Android SDK 36 (Android 16 / "Baklava") is a stable, production SDK (Platform Stability reached; SDK Platform Revision 1 released). Google continues to ship quarterly minor updates (QPRs) and beta builds (QPR1–QPR3 betas/QPR images) but API 36 is stable for targeting and production use; developers should test against the latest QPR/beta images for device-specific fixes and large‑screen behavior changes. [1][2][3]

Sources

  • SDK platform/revision and stability notes (Android Studio / SDK Platforms). [1]
  • Android 16 release notes and QPR beta timeline. [2]
  • Android Developers blog summary of app-impacting behavior changes for Android 16 (targeting/API expectations and opt‑outs for large screens). [3]

🌐 Web query:

Kotlin 2.1.20 release status and compatibility with React Native

💡 Result:

Short answer

  • Kotlin 2.1.20 is a released tooling update (released March 20, 2025). [1][2]
  • React Native itself has no single enforced Kotlin runtime version; compatibility depends on the Android native modules you use (many RN modules and Compose-related libraries enforce or expect specific Kotlin/Compose-compiler metadata), so moving to 2.1.20 can work but may break some native dependencies until those libraries are updated. Common workarounds are pinning a Kotlin version in android/build.gradle or waiting/upgrading native modules that require newer Kotlin. Test your app and native modules after upgrading. [1][2][3][4]

Sources

  • Kotlin 2.1.20 “What’s new” and releases. [1][2]
  • Examples of React Native Android module issues caused by Kotlin-version mismatches (GitHub/issues and community threads). [3][4]

🌐 Web query:

React Native 0.81 Android SDK 36 compileSdkVersion compatibility requirements

💡 Result:

Short answer

  • React Native 0.81 defaults to targeting Android 16 (API level 36). Set targetSdkVersion = 36. [1]
  • Your project must compile against API 36 (compileSdkVersion >= 36) if you use libraries that require API 36. [1][2]
  • To compile with API 36 you must use an Android Gradle Plugin that supports API 36 (AGP 8.10+ / AGP releases that list API 36 support) and a compatible Gradle/JDK per AGP docs. Install Android SDK Platform 36 in SDK Manager. [2][3]

Practical checklist

  1. android/app/build.gradle (or build.gradle.kts): set compileSdk = 36 and targetSdk = 36. [1]
  2. Upgrade AGP to a version that supports API 36 (e.g. AGP 8.10+), and upgrade Gradle/JDK to the versions AGP requires. [2][3]
  3. In Android Studio SDK Manager install "Android API 36 (Android 16)" platform. [1][2]
  4. Rebuild and test for Android‑16 behavior changes (edge-to-edge, back gesture, SafeAreaView deprecation). [1]

Sources

  • React Native 0.81 release notes (Android 16 / API 36 defaults). [1]
  • Android Gradle Plugin 8.10.0 compatibility (supports API 36). [2]
  • Android Developers AGP/API-level compatibility table. [3]

Verify Kotlin 2.1.20 compatibility with third-party native modules before merging.

Android SDK 36 with compileSdkVersion and targetSdkVersion 36 is officially required and stable for React Native 0.81. However, Kotlin 2.1.20 may break native module dependencies—many Android libraries and React Native modules have not yet been updated to support this version. Before proceeding, test your build and native modules with Kotlin 2.1.20, or pin an earlier Kotlin version in android/build.gradle until dependent libraries are updated.

🤖 Prompt for AI Agents
In android/build.gradle around lines 3 to 8, Kotlin is set to 2.1.20 which may
break third-party native modules; either validate compatibility by building the
app and running all native-module integration tests (clean build,
assembleRelease/Debug, and run on devices/emulators) and fix any module
compilation errors, or pin kotlinVersion to a proven-compatible release (for RN
0.81 ecosystems prefer e.g. 1.8.22) until dependents are updated; if pinning,
change kotlinVersion in this file to the chosen version and re-run Gradle sync
and full builds to confirm all native modules compile.

kotlin_version = kotlinVersion
glideVersion = "4.11.0"
supportLibVersion = "28.0.0"
Expand Down
7 changes: 6 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ BugsnagAPIKey=""

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
hermesEnabled=true

# Use this property to enable edge-to-edge display support.
# This allows your app to draw behind system bars for an immersive UI.
# Note: Only works with ReactActivity and should not be used with custom Activity.
edgeToEdgeEnabled=false
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Gradle 8.14.3 compatibility Android SDK 36

💡 Result:

Short answer: Yes — Gradle 8.14.3 can be used with Android API/SDK 36, provided you use a compatible Android Gradle Plugin (AGP) release (AGP 8.13.x is the AGP line that documents support for API level 36). Update the Gradle wrapper to 8.14.3 and use AGP 8.13.x (or a later AGP that lists API 36 support). [1][2]

References:

  • Gradle 8.14.3 release notes (upgrade the wrapper to 8.14.3). [1]
  • Android Gradle Plugin compatibility / notes (AGP 8.13 supports maximum API level 36 and pairs with Gradle 8.13+). [2]

🌐 Web query:

Gradle 8.14.3 Kotlin 2.1.20 compatibility

💡 Result:

Short answer: Kotlin 2.1.20 is not officially supported on Gradle 8.14.3. Kotlin 2.1.20’s documented “fully supported” Gradle range ends at ~8.12.1, so Gradle 8.14.3 is newer than the officially supported maximum — it may work, but you can encounter deprecation warnings or breakage. [1][2]

Recommendation: upgrade the Kotlin Gradle plugin to a 2.2.x (or later) KGP that lists Gradle 8.14 as supported (e.g., 2.2.20+ / 2.3.0 for fuller support), or use a Gradle version ≤ 8.12.1 if you must stay on Kotlin 2.1.20. [2][3]

Sources:

  • Kotlin 2.1.20 release notes (states full support through Gradle 8.11 and notes about newer Gradle possibly producing warnings). [1]
  • Kotlin Gradle plugin compatibility table (shows KGP 2.1.20–2.1.21 fully supported on Gradle 7.6.3–8.12.1). [2]
  • Gradle compatibility / Kotlin guidance (shows which Gradle / Kotlin ranges are tested; use newer KGP for Gradle 8.14). [3]

Gradle 8.14.3 requires Kotlin 2.2.x or later — current Kotlin 2.1.20 is not officially supported.

Gradle 8.14.3 is compatible with Android SDK 36 when using AGP 8.13.x or later. However, Kotlin 2.1.20 is only officially supported up to Gradle 8.12.1; using it with Gradle 8.14.3 may produce deprecation warnings or build failures. Either upgrade Kotlin to 2.2.x+ (which supports Gradle 8.14) or downgrade Gradle to 8.12.1 if staying on Kotlin 2.1.20.

🤖 Prompt for AI Agents
In android/gradle/wrapper/gradle-wrapper.properties around line 3, the project
currently pins Gradle to 8.14.3 which is incompatible with Kotlin 2.1.20; either
upgrade the Kotlin plugin to 2.2.x or later or change the distributionUrl to a
Gradle version supported by Kotlin 2.1.20 (e.g., 8.12.1). To fix, choose one: A)
update the Kotlin version in your Gradle settings/build.gradle(.kts) to 2.2.x+
(bump the kotlin plugin and any Kotlin stdlib/native deps) and rebuild; or B)
edit distributionUrl in this file to use
https://services.gradle.org/distributions/gradle-8.12.1-bin.zip to remain on
Kotlin 2.1.20. Ensure you run a clean build after making the change and update
any CI config that pins Gradle or Kotlin versions.

networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
9 changes: 7 additions & 2 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
@REM
@REM This source code is licensed under the MIT license found in the
@REM LICENSE file in the root directory of this source tree.

@rem
@rem Copyright 2015 the original author or authors.
@rem
Expand Down Expand Up @@ -70,11 +75,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"name": "RocketChatRN"
"name": "RocketChatRN",
"plugins": ["@react-native-community/datetimepicker", "expo-web-browser"]
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
}
],
['@babel/plugin-proposal-decorators', { legacy: true }],
'react-native-reanimated/plugin',
'react-native-worklets/plugin',
'@babel/plugin-transform-named-capturing-groups-regex',
['module:react-native-dotenv']
],
Expand Down
6 changes: 4 additions & 2 deletions ios/NotificationService/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<dict>
<key>AppGroup</key>
<string>group.ios.chat.rocket</string>
<key>IS_OFFICIAL</key>
<false/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -24,6 +22,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>IS_OFFICIAL</key>
<false/>
<key>KeychainGroup</key>
<string>$(AppIdentifierPrefix)chat.rocket.reactnative</string>
<key>NSExtension</key>
Expand All @@ -33,5 +33,7 @@
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
<key>RCTNewArchEnabled</key>
<true/>
</dict>
</plist>
Loading
Loading