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

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    namespace "com.rapidoreach"

    compileSdk safeExtGet("compileSdkVersion", 34)

    defaultConfig {
        minSdkVersion safeExtGet("minSdkVersion", 23)
        targetSdkVersion safeExtGet("targetSdkVersion", 34)
        versionCode 1
        versionName "1.0"
    }

    lint {
        abortOnError false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = "17"
    }
}

repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
}

dependencies {
    // The version of react-native is set by the consuming app's React Native Gradle Plugin.
    implementation "com.facebook.react:react-android"

    implementation "com.rapidoreach:cbofferwallsdk:1.1.0"

    implementation "androidx.appcompat:appcompat:1.6.1"
    implementation "androidx.annotation:annotation:1.7.1"
    implementation "com.google.android.gms:play-services-ads-identifier:18.1.0"
    implementation "com.google.android.gms:play-services-appset:16.1.0"
}
