buildscript {
  repositories {
    google()
    jcenter()
    mavenCentral()
  }
  dependencies {
    classpath('com.android.tools.build:gradle:8.0.2')
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}

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

android {
  compileSdk 34

  defaultConfig {
    minSdk 21
    targetSdk 34
  }
  lintOptions {
    abortOnError false
    // This is needed to avoid spurious lint errors from libthrift and log4j.
    lint.disable 'InvalidPackage'
  }
  packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

}

dependencies {
  implementation 'com.facebook.react:react-native:+'
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.22"
  if (rootProject.hasProperty("rnzendrive") && rootProject.ext.rnzendrive.useHmsVariant) {
    println("> Using HMS Variant")
    implementation "com.zendrive.sdk.android:ZendriveSDK-HMS:10.1.0"
  } else {
    println("> Not Using HMS Variant")
    implementation "com.zendrive.sdk.android:ZendriveSDK:10.1.0"
  }
}
