You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f7f9cf5
Browse filesBrowse the repository at this point in the historyBrowse files
Summary:
Kotlin 2.3 introduced warnings that fail the Android Gradle builds when warnings are treated as errors:
- API version 2.0 is deprecated. Bump `apiVersion` to `KOTLIN_2_1` in the four gradle-plugin build files, as the previous Kotlin upgrade did when it moved from 1.9 to 2.0. Gradle 9, which React Native requires, ships a Kotlin 2.2 runtime, so the plugin still loads on every supported Gradle version.
- `-Xjvm-default` is deprecated in favor of `-jvm-default`. Replace `-Xjvm-default=all` in `ReactAndroid` with its equivalent, `jvmDefault = JvmDefaultMode.NO_COMPATIBILITY`.
- Kotlin 2.3 reports more redundant casts, non-null assertions, safe calls and Elvis operators after smart casts or on non-null platform types. Remove them in the gradle-plugin `JsonUtilsTest`, in `ReactAndroid` sources (`WritableNativeArray`, `MountItemDispatcher`, `PreAllocateViewMountItem`, `AppStateModule`, `NetworkingModule`, `UIManagerModule`, `ReactTextViewAccessibilityDelegate`) and in `ReactAndroid` unit tests (`NativeAnimatedNodeTraversalTest`, `DeviceInfoModuleTest`, `UIManagerModuleConstantsTest`).
Changelog:
[Android][Changed] - Bumped the Gradle plugin minimum Kotlin API version to 2.1
Reviewed By: andrewdacenko
Differential Revision: D127831836
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ internal class MountItemDispatcher(
151
151
} catch (e:RetryableMountingLayerException) {
152
152
if (item isDispatchCommandMountItem) {
153
153
// Only DispatchCommandMountItem supports retries
154
-
val mountItem:DispatchCommandMountItem= itemasDispatchCommandMountItem
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ internal class PreAllocateViewMountItem(
0 commit comments