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

dependencies {
  api "com.appboy:android-sdk-base:${BRAZE_SDK_VERSION}"
  compileOnly "com.google.android.material:material:${GOOGLE_MATERIAL_VERSION}"

  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${KOTLIN_COROUTINES_VERSION}"
  implementation "androidx.core:core:${ANDROIDX_CORE_VERSION}"
  implementation "androidx.fragment:fragment:${ANDROIDX_FRAGMENT_VERSION}"
  implementation "androidx.recyclerview:recyclerview:${ANDROIDX_RECYCLERVIEW_VERSION}"
  implementation "androidx.swiperefreshlayout:swiperefreshlayout:${ANDROIDX_SWIPE_REFRESH_LAYOUT_VERSION}"
  implementation "androidx.webkit:webkit:${ANDROIDX_WEBKIT_VERSION}"

  // Required for the FirebaseMessagingService
  compileOnly "com.google.firebase:firebase-messaging:${FIREBASE_PUSH_MESSAGING_VERSION}"
}

android {
  compileSdkVersion rootProject.ext.compileSdkVersion
  buildToolsVersion rootProject.ext.buildToolsVersion

  defaultConfig {
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    consumerProguardFiles 'braze-consumer-proguard-rules.pro'
  }

  kotlinOptions {
    freeCompilerArgs = ['-Xjvm-default=all']
    jvmTarget = "1.8"
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}
