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

buildscript {
    ext {
        minSdkVersion = 24
        compileSdkVersion = 36
        targetSdkVersion = 36
        
        // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
        ndkVersion = "27.1.12297006"

        ffmpegKitPackage = "audio"
        kotlinVersion = "2.3.20"
    }
    repositories {
        mavenLocal()
        google()
        mavenCentral()
    }
    dependencies {
        classpath('com.android.tools.build:gradle:8.13.2')
        classpath(libs.react.native.gradle.plugin)
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
    }
}

def reactNativeAndroidDir = new File(
        providers.exec {
            workingDir(rootDir)
            commandLine("node", "--print", "require.resolve('react-native/package.json')")
        }.standardOutput.asText.get().trim(),
        "../android"
)


allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url(reactNativeAndroidDir)
        }

        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
        maven {
            name = "TarsosDSP repository"
            url = "https://mvn.0110.be/releases"
        }
    }
}

apply plugin: "com.facebook.react.rootproject"
apply plugin: "expo-root-project"
