buildscript {
  ext.safeExtGet = { prop, fallback ->
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
  }
}

apply plugin: "com.android.library"
apply plugin: "org.jetbrains.kotlin.android"

android {
  namespace "ai.sirrus.reactnativesdk"
  compileSdkVersion safeExtGet("compileSdkVersion", 34)

  defaultConfig {
    minSdkVersion safeExtGet("minSdkVersion", 23)
    targetSdkVersion safeExtGet("targetSdkVersion", 34)
    consumerProguardFiles "consumer-rules.pro"
  }

  lintOptions {
    abortOnError false
  }
}

repositories {
  google()
  mavenCentral()
}

dependencies {
  implementation "com.facebook.react:react-native:+"
  implementation "androidx.core:core-ktx:1.13.1"
  implementation "androidx.appcompat:appcompat:1.7.0"
  implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseMessagingVersion', '24.1.2')}"
}
