buildscript {
  if (project == rootProject) {
    def kotlin_version = safeExtGet('kotlinVersion', '1.5.31')

    repositories {
      google()
    }

    dependencies {
      classpath 'com.android.tools.build:gradle:3.5.3'
    }
  }
}

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

def safeExtGet(prop, fallback) {
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
  compileSdkVersion safeExtGet('WaveformSeekBar_compileSdkVersion', 30)
  buildToolsVersion safeExtGet('WaveformSeekBar_buildToolsVersion', '30.0.3')
  defaultConfig {
    minSdkVersion safeExtGet('WaveformSeekBar_minSdkVersion', 16)
    targetSdkVersion safeExtGet('WaveformSeekBar_targetSdkVersion', 30)
    versionCode 1
    versionName "1.0"
  }

  buildTypes {
    release {
      minifyEnabled false
    }
  }
  lintOptions {
    disable 'GradleCompatible'
  }
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

repositories {
  mavenLocal()
  maven {
    // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
    url("$rootDir/../node_modules/react-native/android")
  }
  maven { url 'https://jitpack.io' }
  google()
  jcenter()
}

dependencies {
  implementation "com.facebook.react:react-native:+"
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  implementation  'com.github.massoudss:waveformSeekBar:4.1.0'
}
