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

android {
  compileSdkVersion Config.compileSdkVersion
  buildToolsVersion Config.buildToolsVersion

  testBuildType project.getProperties().get("testBuildType", "debug")

  defaultConfig {
    minSdkVersion Config.webView_minSdkVersion
    targetSdkVersion Config.targetSdkVersion
    missingDimensionStrategy 'abi', 'abi_all', 'abi_arm', 'abi_arm64', 'abi_x86'
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  }

  sourceSets {
    test.java.srcDirs += 'src/test/kotlin'
    androidTest.java.srcDirs += 'src/androidTest/kotlin'
  }
}

bintray {
  pkg {
    desc="An Android library that provides a WebView component with Adblock Plus integrated."
  }
}

dependencies {
  api project(':adblock-android')
  testImplementation Deps.junit4
  testImplementation Deps.kotlin_stdlib
  testImplementation Deps.mockito_core
  testImplementation Deps.mockito_kotlin
  androidTestImplementation Deps.androidx_test_core
  androidTestImplementation Deps.androidx_test_rules
  androidTestImplementation Deps.androidx_test_runner
  androidTestImplementation Deps.androidx_test_ext_junit
  androidTestImplementation Deps.androidx_test_espresso_core
  androidTestImplementation Deps.androidx_test_espresso_web
  androidTestImplementation Deps.kotlin_stdlib
  androidTestImplementation Deps.mockito_core
  androidTestImplementation Deps.mockito_android
  androidTestImplementation Deps.mockito_kotlin
  androidTestImplementation Deps.wiremock_standalone
  androidTestImplementation project(path: ':adblock-android-settings')
}
