apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply from: './versions.gradle'
apply plugin: 'com.novoda.bintray-release'

publish {
  def groupProjectID = 'com.zebrostudio.rxlowpoly'
  def artifactProjectID = 'rxlowpoly'
  def publishVersionID = '1.0.0'

  userOrg = 'abhriyaroy'
  repoName = 'RxLowpoly'
  groupId = groupProjectID
  artifactId = artifactProjectID
  publishVersion = publishVersionID
  desc = 'An Android library to bring your ordinary photos to life with an awesome crystallized effect.'
  website = 'https://github.com/abhriyaroy/RxLowpoly'
}

android {
  compileSdkVersion COMPILE_SDK_VERSION

  defaultConfig {
    minSdkVersion MINIMUM_SDK_VERSION
    targetSdkVersion TARGET_SDK_VERSION
    versionCode LOWPOLY_RX_VERSION_CODE
    versionName LOWPOLY_RX_VERSION_NAME

    externalNativeBuild {
      cmake {
        cppFlags "-std=c++11 -frtti -fexceptions"
      }
    }
  }

  buildTypes {
    release {
      minifyEnabled false
    }
  }

  externalNativeBuild {
    cmake {
      path "CMakeLists.txt"
    }
  }
}

dependencies {
  // Kotlin
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
  // Android support
  implementation "androidx.appcompat:appcompat:$SUPPORT_LIBRARY_VERSION"
  // Rx java
  api "io.reactivex.rxjava2:rxjava:$RX_JAVA_VERSION"
  // Rx android
  api "io.reactivex.rxjava2:rxandroid:$RX_ANDROID_VERSION"
}

repositories {
  mavenCentral()
}
