apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply from: "../ktlint.gradle"

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8.toString()
        targetCompatibility JavaVersion.VERSION_1_8.toString()
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }

    defaultConfig {
        applicationId "com.discord.panels"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }

    lintOptions {

        // Used to hard fail on errors.
        abortOnError true

        // Used to consider all warnings as errors.
        warningsAsErrors true

        // Used to process sub modules.
        checkDependencies true

        // Used specific lint checks and suppression.
        lintConfig file("../tools/lint.xml")
    }

    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
    implementation "androidx.core:core-ktx:$androidxCoreVersion"
    implementation "io.reactivex.rxjava3:rxjava:$rxJavaVersion"
    implementation project(':overlapping_panels')
    implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
    implementation "com.google.android.material:material:$materialDesignVersion"

    testImplementation "junit:junit:$junitVersion"
    testImplementation "com.google.truth:truth:$truthVersion"
    testImplementation "org.robolectric:robolectric:$robolectricVersion"

    testAnnotationProcessor "org.robolectric:robolectric:$robolectricVersion"

}
