diff --git a/packages/docs-gesture-handler/docs/fundamentals/installation.mdx b/packages/docs-gesture-handler/docs/fundamentals/installation.mdx index 0c9881ac75..ad935ee4b0 100644 --- a/packages/docs-gesture-handler/docs/fundamentals/installation.mdx +++ b/packages/docs-gesture-handler/docs/fundamentals/installation.mdx @@ -91,16 +91,6 @@ export function CustomModal({ children, ...rest }) { } ``` -Gesture Handler on Android is implemented in Kotlin. If you need to set a specific Kotlin version to be used by the library, set the `kotlinVersion` ext property in the `android/build.gradle` file and RNGH will use that version: - -```groovy -buildscript { - ext { - kotlinVersion = "2.1.20" - } -} -``` - #### iOS While developing for iOS, make sure to install [pods](https://cocoapods.org/) first before running the app: diff --git a/packages/react-native-gesture-handler/android/build.gradle b/packages/react-native-gesture-handler/android/build.gradle index e6bcad6d9a..3f5f514cc1 100644 --- a/packages/react-native-gesture-handler/android/build.gradle +++ b/packages/react-native-gesture-handler/android/build.gradle @@ -2,17 +2,18 @@ import groovy.json.JsonSlurper import com.android.build.gradle.tasks.ExternalNativeBuildJsonTask buildscript { - def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['RNGH_kotlinVersion'] - repositories { mavenCentral() google() } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - classpath("com.android.tools.build:gradle:8.10.1") - classpath("com.diffplug.spotless:spotless-plugin-gradle:7.0.4") + if (project == rootProject) { + def kotlin_version = project.properties['RNGH_kotlinVersion'] + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + classpath("com.android.tools.build:gradle:8.10.1") + classpath("com.diffplug.spotless:spotless-plugin-gradle:7.0.4") + } } }