apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-kapt"

android {
    compileSdkVersion 30
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "ru.ra66it.updaterforspotify"
        minSdkVersion 21
        targetSdkVersion 30

        versionCode 21
        versionName "1.38"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        buildConfigField "String", "SPOTIFY_BASE_URL", "\"https://ws75.aptoide.com\""
        buildConfigField "String", "SPOTIFY_API", "\"/api/7/app/getMeta/package_name=com.spotify.music\""
    }

    buildFeatures {
        viewBinding true
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

kapt {
    generateStubs = true
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "androidx.appcompat:appcompat:1.3.0"
    testImplementation "junit:junit:4.13"
    androidTestImplementation "androidx.test:runner:1.4.0"
    androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"

    implementation "com.google.android.material:material:1.4.0"
    implementation "androidx.preference:preference-ktx:1.1.1"
    implementation "android.arch.lifecycle:extensions:1.1.1"

    implementation "com.squareup.okhttp3:okhttp:4.9.0"
    implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
    implementation "com.squareup.retrofit2:retrofit:2.9.0"
    implementation "com.squareup.retrofit2:converter-gson:2.9.0"

    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0"
    implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"

    implementation "androidx.work:work-runtime-ktx:2.5.0"

    implementation 'com.google.dagger:dagger:2.37'
    kapt 'com.google.dagger:dagger-compiler:2.37'

    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.10"
}
