From b7f7a283f1d7ab386cffad840dc98cf3a6ea3efb Mon Sep 17 00:00:00 2001 From: Adam McArthur Date: Tue, 22 Oct 2024 15:52:18 +1100 Subject: [PATCH] Update Android Kotlin documentation for RN0.73+ --- README.md | 2 +- docs/kotlin.md | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2b67be7..044ef06 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ cd ios && pod install && cd .. ``` Android: -[Add Kotlin to your project](./docs/kotlin.md) +[Review your Kotlin configuration](./docs/kotlin.md) to ensure it's compatible with this library. ## Permissions diff --git a/docs/kotlin.md b/docs/kotlin.md index e7735b7..dbcbc5b 100644 --- a/docs/kotlin.md +++ b/docs/kotlin.md @@ -2,14 +2,16 @@ 1. Open and edit android/build.gradle -Add the `kotlin_version` to `buildscript.ext` +Add the `kotlin_version` to `buildscript.ext`. If you are using React Native `0.73` or higher, you should already have a variable called `kotlinVersion` defined inside of here, so remember you can reference this instead of repeating the version number twice: ``` buildscript { - ext { + ext { ... - kotlin_version = '1.7.20' - } + kotlinVersion = '1.7.20' // Variable now included for React Native core + kotlin_version = kotlinVersion // Used by react-native-camera-kit + } +} ``` Add `google()` to the `buildscript.repositories` and `allprojects.repositories`