apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

project.ext {
    pomName = "MobileKit Feedback Module"
    pomDescription = "A library for collecting in-app feedback, sent directly to your JIRA project"
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled = true
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    //Dependencies are listed in alphabetical order.
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    implementation "androidx.core:core-ktx:1.3.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"

    implementation "com.google.android.material:material:1.2.0"

    implementation "io.reactivex:rxjava:1.3.8"
    implementation "io.reactivex:rxjava-reactive-streams:1.2.1"

    api 'androidx.constraintlayout:constraintlayout:2.0.1'
    api "androidx.cardview:cardview:1.0.0"

    api "com.squareup.okhttp3:okhttp:$okhttp_version"
    api "com.squareup.retrofit2:retrofit:$retrofit_version"
    api "com.squareup.retrofit2:converter-gson:$retrofit_version"
}