apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: '../maven_push.gradle'

android {
  compileSdkVersion rootProject.ext.compile_sdk_version
  defaultConfig {
    minSdkVersion rootProject.ext.min_sdk_version
    targetSdkVersion rootProject.ext.target_sdk_version
    versionName VERSION_NAME
  }

  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }

  sourceSets {
    main {
      java {
        include '**/*.java'
        include '**/*.kt'
      }
    }
  }
}

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation "com.android.support:appcompat-v7:$support_library_version"
  implementation "com.android.support:support-fragment:$support_library_version"
  implementation "com.android.support:support-annotations:$support_library_version"
  implementation "com.google.code.gson:gson:$gson_version"
  implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
  implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
  implementation("com.squareup.retrofit2:converter-gson:$retrofit_version") {
    exclude group: 'com.squareup.okhttp3'
    exclude group: 'com.google.code.gson'
  }
  implementation("com.squareup.retrofit2:adapter-rxjava2:$retrofit_version") {
    exclude group: 'com.squareup.okhttp3'
  }
  implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
  implementation("io.reactivex.rxjava2:rxandroid:$rx_android_version") {
    exclude module: 'rxjava'
  }
  implementation("com.squareup.okhttp3:logging-interceptor:$okhttp_version") {
    exclude group: 'com.android.support'
    exclude group: 'com.squareup.okhttp3'
  }
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  //implementation "org.jetbrains.anko:anko-commons:$anko_version"
  implementation "org.jetbrains.anko:anko-sqlite:$anko_version"
}