Commit 7bf8b07
fix(android): compile RNGestureHandlerModule with Kotlin 2.3 (#4043)
## Summary
Fixes Android compilation when using **Kotlin 2.3.x**. The previous code
compared `it.rootView.rootViewTag` to a local `rootViewTag`; the local
name shadows the synthetic property accessor, and Kotlin **2.3**
reports:
> Function invocation `getRootViewTag()` expected
Use an explicit receiver and `ReactRootView#getRootViewTag()` instead.
## Context
- Downstream projects bump Kotlin (e.g. to **2.3.0**) for dependencies
such as **Stripe Android SDK** and hit a hard failure in
`:react-native-gesture-handler:compileDebugKotlin`.
- Closes #4042.
## Test plan
- [ ] `./gradlew
:packages:react-native-gesture-handler:compileDebugKotlin` (or
project-equivalent) with Kotlin **2.3.x**
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>1 parent 686e015 commit 7bf8b07
1 file changed
Lines changed: 2 additions & 1 deletion
File tree
- packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
0 commit comments