apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'com.novoda.bintray-release'

android {
    compileSdkVersion 30
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 30
        versionCode 1
        versionName "1.0.0"

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }
    sourceSets {
        androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

androidExtensions {
    experimental = true
}

//def lifecycleVersion = '2.0.0'
def roomVersion = "2.4.3"
//def preferencexVersion = '1.0.0'
dependencies {

    implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.30-M1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"

    implementation "androidx.core:core-ktx:1.2.0"
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0"
    implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:2.4.0"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
    implementation "androidx.room:room-runtime:$roomVersion" // runtime
    implementation "androidx.preference:preference:1.1.0"
    implementation "androidx.work:work-runtime-ktx:2.7.1"
    implementation "androidx.browser:browser:1.3.0-alpha01"
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    implementation "com.google.android.material:material:1.2.0-alpha05"
    implementation "com.google.code.gson:gson:2.8.5"

    implementation "dnsjava:dnsjava:2.1.9"
    implementation "com.github.kruton:jsocks:1.0.0"
    implementation "com.afollestad.material-dialogs:core:2.6.0"
//    api "com.takisoft.preferencex:preferencex:1.0.0"
    implementation 'com.takisoft.preferencex:preferencex:1.1.0'
    api 'com.github.kruton:jsocks:1.0.0'

    kapt "androidx.room:room-compiler:$roomVersion"
    kapt "androidx.lifecycle:lifecycle-compiler:2.4.0"
}
