buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.2.0'
    }
}

apply plugin: 'com.android.library'

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

android {
    namespace "com.datalyr.reactnative"
    compileSdkVersion safeExtGet('compileSdkVersion', 35)

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 21)
        targetSdkVersion safeExtGet('targetSdkVersion', 35)
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    lint {
        abortOnError false
    }
}

repositories {
    google()
    mavenCentral()
}

dependencies {
    // React Native
    implementation "com.facebook.react:react-native:+"

    // Google Play Install Referrer
    implementation 'com.android.installreferrer:installreferrer:2.2'

    // Google Advertising ID (GAID) for attribution
    implementation 'com.google.android.gms:play-services-ads-identifier:18.1.0'
}
