// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
  ext {
    buildToolsVersion = "34.0.0"
    minSdkVersion = 28
    compileSdkVersion = 34
    targetSdkVersion = 34
    ndkVersion = "25.2.9519653"
    kotlinVersion = "1.8.20"

    appCompat = "1.6.1"
    compose = "1.4.3"
    corePerf = "1.0.0-beta01"
    flowlayout = "0.23.1"
    kotlinSerialization = "1.5.1"
    lifecycle = "2.5.1"
  }
  repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
  }
  dependencies {
    classpath("com.android.tools.build:gradle")
    classpath("com.facebook.react:react-native-gradle-plugin")
    classpath('com.google.gms:google-services:4.3.15')
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
    classpath("io.sentry:sentry-android-gradle-plugin:4.4.0")
  }
}

plugins {
  id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
}

allprojects {
  repositories {
    maven {
      url = rootProject.file("../../../node_modules/detox/Detox-android")
    }
  }
  project.pluginManager.withPlugin("com.facebook.react") {
    react {
      reactNativeDir = rootProject.file("../../../node_modules/react-native/")
      codegenDir = rootProject.file("../../../node_modules/react-native-codegen/")
    }
  }

  repositories {
    maven {
      // expo-camera bundles a custom com.google.android:cameraview
      url "$rootDir/../../../node_modules/expo-camera/android/maven"
    }
  }
}

apply plugin: "com.facebook.react.rootproject"
