// Top-level build file where you can add configuration options common to all sub-projects/modules.
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

buildscript {
    ext {
        googlePlayServiceVersion = "17.0.0"
        buildToolsVersion = "33.0.0"
        minSdkVersion = 21
        kotlinVersion = "1.9.0"
        compileSdkVersion = 35
        targetSdkVersion = 35
        REACT_NATIVE_VERSION = "0.72.6"
        facebookSdkVersion = "13.1.0"

         // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
        ndkVersion = "23.1.7779620"
    }
    repositories {
        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
    dependencies {
//        classpath("com.android.tools.build:gradle:8.0.2")
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath 'com.google.gms:google-services:4.4.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }
    configurations.all {
        resolutionStrategy {
           force "com.facebook.react:react-native:${REACT_NATIVE_VERSION}"
        }
    }
}
