buildscript {
  repositories {
    maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
    google()
    mavenCentral()
    maven { url 'https://plugins.gradle.org/m2/' }
  }

  dependencies {
    classpath 'com.android.tools.build:gradle:7.0.2'
    classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5'
  }
}

apply plugin: 'com.android.application'
apply plugin: "com.dicedmelon.gradle.jacoco-android"

repositories {
  mavenCentral()
  google()
}

android {
  compileSdkVersion 31
  buildToolsVersion '31.0.0'

  defaultConfig {
    minSdkVersion 15
    //noinspection ExpiredTargetSdkVersion
    targetSdkVersion 31
    versionCode 1
    versionName '1.0.0'
    testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  }

  flavorDimensions "version"
  productFlavors {
    free {
      dimension "version"
      applicationId 'com.dicedmelon.example.android.free'
    }
    paid {
      dimension "version"
      applicationId 'com.dicedmelon.example.android'
    }
  }

  buildTypes {
    debug {
      applicationIdSuffix '.debug'
      versionNameSuffix '-debug'
      testCoverageEnabled true
    }
  }

  dataBinding {
    enabled = true
  }
}

dependencies {
  implementation 'androidx.appcompat:appcompat:1.0.0'

  testImplementation 'org.assertj:assertj-core:1.7.1'
  testImplementation 'junit:junit:4.13.1'

  androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
