ext.RNTheoremReach = [
  minSdkVersion: 24,
  compileSdkVersion: 36
]

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

  return RNTheoremReach[prop]
}


apply plugin: "com.android.library"

if (project.extensions.findByName("kotlin") == null) {
  apply plugin: "kotlin-android"
}


apply plugin: "com.facebook.react"

android {
  namespace "com.theoremreach.reactnative"

  compileSdk getExtOrDefault("compileSdkVersion")

  defaultConfig {
    minSdk getExtOrDefault("minSdkVersion")
  }
}

dependencies {
  implementation "com.facebook.react:react-android"
  // package.json's "theoremreach.androidSdk" names the same version; CI checks they agree.
  implementation "com.theoremreach:theoremreach:3.7.2"
}
