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

apply plugin: 'com.android.library'

android {
    compileSdkVersion 34
    buildToolsVersion "34.0.0"

    def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION

    if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
      namespace "com.mixpanel.reactnative"
    }

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError true
    }
}

repositories {
    mavenCentral()
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }
}

dependencies {
    implementation 'com.facebook.react:react-native:+'
    implementation 'com.mixpanel.android:mixpanel-android:8.0.3'
}
