ext {
    androidxAppCompatVersion = project.hasProperty("androidxAppCompatVersion") ? rootProject.ext.androidxAppCompatVersion : "1.6.1"
    androidxCoreVersion = project.hasProperty("androidxCoreVersion") ? rootProject.ext.androidxCoreVersion : "1.10.0"
    junitVersion = project.hasProperty("junitVersion") ? rootProject.ext.junitVersion : "4.13.2"
    androidxJunitVersion = project.hasProperty("androidxJunitVersion") ? rootProject.ext.androidxJunitVersion : "4.13.2"
    androidxEspressoCoreVersion = project.hasProperty("androidxEspressoCoreVersion") ? rootProject.ext.androidxEspressoCoreVersion : "4.13.2"
    //dependency version
    moengageNativeBomVersion = "2.2.2"
    moengagePluginBaseBomVersion = "3.0.1"
}

buildscript {
    ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : "1.9.25"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:8.7.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    namespace "com.moengage.capacitor.geofence"
    compileSdkVersion project.hasProperty("compileSdkVersion") ? rootProject.ext.compileSdkVersion : 35
    defaultConfig {
        minSdkVersion project.hasProperty("minSdkVersion") ? rootProject.ext.minSdkVersion : 23
        targetSdkVersion project.hasProperty("targetSdkVersion") ? rootProject.ext.targetSdkVersion : 35
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions{
        jvmTarget = '17'
    }
    buildFeatures {
        buildConfig true
    }
}

repositories {
    google()
    mavenCentral()
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':capacitor-android')
    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
    testImplementation "junit:junit:$junitVersion"
    androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
    implementation(platform("com.moengage:android-bom:$moengageNativeBomVersion"))
    compileOnly("com.moengage:moe-android-sdk")
    api("com.moengage:geofence")
    implementation(platform("com.moengage:plugin-base-bom:$moengagePluginBaseBomVersion"))
    api("com.moengage:plugin-base-geofence")
}







