// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
  repositories {
    mavenLocal()
    maven { url 'https://maven.google.com'  }
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:4.2.1'
    classpath 'com.google.gms:google-services:4.0.1'
  }
}

allprojects {
  repositories {
    mavenLocal()
    maven { url 'https://maven.google.com'  }
    jcenter()
  }
}

apply plugin: 'com.android.application'

android {
  compileOptions {
    sourceCompatibility 1.8
    targetCompatibility 1.8
  }
  compileSdkVersion 34
  ndkPath System.getenv('ANDROID_NDK_HOME')
  buildToolsVersion '30.0.2'

  sourceSets {
    main {
      jniLibs.srcDirs = ['libs']
      manifest.srcFile 'AndroidManifest.xml'
      java.srcDirs = ['src/android/java']
      res.srcDirs = ['res']
    }
  }

  defaultConfig {
    applicationId 'com.google.android.analytics.testapp'
    minSdkVersion 23
    targetSdkVersion 28
    versionCode 1
    versionName '1.0'
    externalNativeBuild.cmake {
      arguments "-DFIREBASE_CPP_SDK_DIR=$gradle.firebase_cpp_sdk_dir"
    }
  }
  externalNativeBuild.cmake {
    path 'CMakeLists.txt'
  }
  buildTypes {
    release {
      minifyEnabled true
      proguardFile getDefaultProguardFile('proguard-android.txt')
      proguardFile file('proguard.pro')
    }
  }
  packagingOptions {
    pickFirst 'META-INF/**/coroutines.pro'
  }
  lintOptions {
      abortOnError false
      checkReleaseBuilds false
  }
}

apply from: "$gradle.firebase_cpp_sdk_dir/Android/firebase_dependencies.gradle"
firebaseCpp.dependencies {
  analytics
}

apply plugin: 'com.google.gms.google-services'
