apply plugin: 'com.android.library'

group = 'expo.modules.geofencingbatchplugin'
version = '0.1.0'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useExpoPublishing()

// If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
// Most of the time, you may like to manage the Android SDK versions yourself.
def useManagedAndroidSdkVersions = false
if (useManagedAndroidSdkVersions) {
  useDefaultAndroidSdkVersions()
} else {
  buildscript {
    // Simple helper that allows the root project to override versions declared by this library.
    ext.safeExtGet = { prop, fallback ->
      rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
    }
  }
  project.android {
    compileSdkVersion safeExtGet("compileSdkVersion", 34)
    defaultConfig {
      minSdkVersion safeExtGet("minSdkVersion", 21)
      targetSdkVersion safeExtGet("targetSdkVersion", 34)
    }
  }
}

android {
  namespace "expo.modules.geofencingbatchplugin"
  defaultConfig {
    versionCode 1
    versionName "0.1.0"
  }
  lintOptions {
    abortOnError false
  }
}

dependencies {
  // For < 0.71, this will be from the local maven repo
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
  //noinspection GradleDynamicVersion
  implementation 'com.google.android.gms:play-services-location:21.0.1'
  implementation 'com.google.code.gson:gson:2.8.8'
  implementation "com.github.Woosmap:geofencing-core-android-sdk:core_geofence_2.+"
  implementation "com.webgeoservices.woosmapgeofencing:woosmap-mobile-sdk:4.+"
  implementation 'com.google.android.gms:play-services-maps:18.1.0'
  implementation 'androidx.room:room-runtime:2.2.4'
  annotationProcessor 'androidx.room:room-compiler:2.2.4'
  implementation 'androidx.room:room-rxjava2:2.2.4'
  implementation 'androidx.room:room-guava:2.2.4'
  implementation "com.batch.android:batch-sdk:2.0.+"
}
