buildscript {
  ext.TurboLnd = [
    minSdkVersion: 24,
    compileSdkVersion: 36,
    targetSdkVersion: 36,
    ndkVersion: "27.1.12297006",
  ]

  ext.getExtOrDefault = { prop ->
    if (rootProject.ext.has(prop)) {
      return rootProject.ext.get(prop)
    }

    return TurboLnd[prop]
  }

  repositories {
    google()
    mavenCentral()
  }

  dependencies {
    classpath "com.android.tools.build:gradle:8.12.0"
  }
}

apply plugin: "com.android.library"

android {
  namespace "com.reactnativeturbolnd"

  compileSdkVersion getExtOrDefault("compileSdkVersion")
  ndkVersion getExtOrDefault("ndkVersion")

  defaultConfig {
    minSdkVersion getExtOrDefault("minSdkVersion")
    targetSdkVersion getExtOrDefault("targetSdkVersion")
  }

  buildTypes {
    release {
      minifyEnabled false
    }
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
  }
}

repositories {
  google()
  mavenCentral()
}

dependencies {
  implementation "com.facebook.react:react-android"
}
