buildscript {
  ext.kotlin_version = "1.3.71"
  repositories {
    mavenLocal()
    google()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.6.1'
    classpath 'me.tatarka:gradle-retrolambda:3.7.0'
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
    classpath 'io.sentry:sentry-android-gradle-plugin:1.7.29'
  }
}

allprojects {
  repositories {
    jcenter()
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    maven { url "https://www.jitpack.io" }
    maven { url "https://dl.bintray.com/asf/asf" }
    maven { url "http://dl.appnext.com/" }

    google()
    maven { url 'https://maven.google.com' }
    maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
    flatDir {
      dirs 'libs'
    }
  }
}

task clean(type: Delete) {
  delete rootProject.buildDir
}

// Gradle wrapper version is being specified dynamically here to prevent IDEA
// from controlling version.
// This will override gradle-wrapper.properties
wrapper {
  gradleVersion = '5.5.1'
  distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}

ext {

  //
  // gradle build script vars
  //
  USE_JACK = false // http://tools.android.com/tech-docs/jackandjill
  BUILD_TOOLS_VERSION = '28.0.3'

  //
  // gradle build script dependencies versions
  //

  // Room versions
  ROOM_VERSION = '2.2.4'
  RXJAVA2_INTEROP = '0.13.7'

  // Google Android Support
  APPCOMPAT_VERSION = '1.1.0'
  CORE_VERSION = '1.2.0'
  ANDROIDX_ANNOTATION_VERSION = '1.1.0'

  MATERIAL_VERSION = '1.2.0-beta01'
  PALETTE_VERSION = '1.0.0'
  RECYCLER_VIEW_VERSION = '1.0.0'
  CARD_VIEW_VERSION = '1.0.0'
  PREFERENCES_VERSION = '1.1.0'
  BROWSER_VERSION = '1.0.0'
  LEGACY_SUPPORT_VERSION = '1.0.0'
  LIFECYCLE_VERSION = '2.2.0'

  // Google Play Services
  PLAY_SERVICES_BASEMENT_VERSION = '16.1.0'
  PLAY_SERVICES_ADS_VERSION = '17.2.1'
  PLAY_SERVICES_SAFETYNET_VERSION = '16.0.0'
  PLAY_SERVICES_AUTH_VERSION = '16.0.1'
  PLAY_SERVICES_LOCATION_VERSION = '17.0.0'

  JAVAX_ANNOTATIONS_VERSION = '10.0-b28'

  MULTIDEX_VERSION = '2.0.0'

  // Rx
  RXJAVA_VERSION = '1.2.7'
  RXANDROID_VERSION = '1.2.1'
  RXJAVA_2_VERSION = '2.2.19'
  RXANDROID_2_VERSION = '2.1.1'
  JW_RX_BINDING_VERSION = '1.0.0'
  RXJAVA_PROGUARD_RULES_VERSION = '1.2.7.0'
  TRELLO_RX_LIFECYCLE_VERSION = '1.0'
  RX_RELAY = '1.2.0'
  Rx_lint_version = '1.2'

  // Retrofit
  RETROFIT_VERSION = '2.1.0'

  // Test
  MOCK_WEB_SERVER_VERSION = '3.4.1'
  JUNIT_VERSION = '4.12'
  MOCKITO_CORE_VERSION = '2.27.0'
  MOCKITO_CORE_ANDROID_VERSION = '2.28.2'
  ESPRESSO_VERSION = '3.2.0'
  RUNNER_VERSION = '1.1.0'
  RULES_VERSION = '1.1.0'

  JACKSON_VERSION = '2.8.5'
  GSON_VERSION = '2.8.2'

  // Material tab strip
  MATERIAL_TAB_STRIP_VERSION = '1.1.0'

  // Glide
  GLIDE_VERSION = '4.9.0'

  // Facebook Android SDK
  FACEBOOK_ANDROID_SDK_VERSION = '7.1.0'

  // File Downloader lib
  FILE_DOWNLOADER_VERSION = '1.4.1'
  FILE_DOWNLOADER_OKHTTP_IMP_VERSION = '1.0.0'

  SUPER_USER_LIB_VERSION = '1.0.0.+'

  // Flurry Android SDK
  FLURRY_VERSION = '12.1.0'


  //Rakam
  RAKAM_VERSION = '2.7.14'


  //Sentry
  SENTRY_VERSION = '1.7.29'

  //MOPUB ADS
  MOPUB_SDK_VERSION = '5.10.0'
  APPLOVIN_SDK_VERSION = '8.1.4'
  MOPUB_MEDIATION_APPLOVIN_VERSION = '8.1.4.3'
  FLURRY_ADS_VERSION = '11.6.0'
  MOPUB_MEDIATION_FLURRY_VERSION = '11.6.0.0'
  VUNGLE_SDK_VERSION = '6.3.24'
  MOPUB_MEDIATION_VUNGLE_VERSION = '6.3.24.2'
  UNITY_ADS_SDK_VERSION = '3.0.1'
  MOPUB_MEDIATION_UNITYADS_VERSION = '3.0.1.0'
  INMOBI_SDK_VERSION = '7.2.7'
  MOPUB_MEDIATION_AD_MOB_SDK_VERSION = '17.2.1.0'
  APPNEXT_SDK_VERSION = '2.4.8.472'

  PICASSO_VERSION = '2.5.2'

  OKHTTP_VERSION = '3.12.3'

  CONSTRAINT_LAYOUT_VERSION = '2.0.4'

  LEAK_CANARY_VERSION = '1.5'
  PARCELER_VERSION = '1.1.12'

  DAGGER_VERSION = '2.24'

  APPC_CONTRACT_PROXY_VERSION = '0.4.5.19b'

  LOTTIE_VERSION = '2.7.0'

  JMDNS_VERSION = '3.5.1'

  EPOXY_VERSION = '3.8.0'

  STATEMACHINE_VERSION = '0.1.2'

  //kotlin
  COROUTINES_VERSION = '1.3.7'
}

// see 'Multi-module reports' in https://developer.android.com/studio/test/command-line.html
apply plugin: 'android-reporting'
