plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
    id 'kotlin-parcelize'
    id 'com.google.android.gms.oss-licenses-plugin'

}

android {
    compileSdkVersion 34

    buildFeatures{
        dataBinding true
        viewBinding true
    }

    defaultConfig {
        applicationId "com.fmaldonado.akiyama"
        minSdkVersion 23
        targetSdkVersion 34
        versionCode 14
        versionName "v3.0.4"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField "String", "BASE_URL", "\"https://bumbleb.uber.space/akiyama/\""
            buildConfigField "String", "GITHUB_URL", "\"https://api.github.com/repos/Fmaldonado6/Akiyama/releases/\""

        }

        debug {
            buildConfigField "String", "GITHUB_URL", "\"https://api.github.com/repos/Fmaldonado6/Akiyama/releases/\""
            buildConfigField "String", "BASE_URL", "\"https://bumbleb.uber.space/akiyama/\""
            applicationIdSuffix ".debug"

        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = '11'
    }
    composeOptions {
        kotlinCompilerExtensionVersion compose_version
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
}

dependencies {
    // Android
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.6.0'
    implementation 'androidx.navigation:navigation-ui-ktx:2.6.0'
    implementation("com.google.android.gms:play-services-oss-licenses:17.0.1")
    implementation 'androidx.fragment:fragment-ktx:1.6.1'
    implementation 'androidx.preference:preference-ktx:1.2.0'

    // HILT
    kapt "com.google.dagger:hilt-android-compiler:2.45"
    implementation "com.google.dagger:hilt-android:2.45"

    //GROUPIE
    implementation "com.xwray:groupie:2.9.0"
    implementation "com.xwray:groupie-viewbinding:2.9.0"

    //Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.google.code.gson:gson:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation("ru.gildor.coroutines:kotlin-coroutines-okhttp:1.0")

    implementation("io.coil-kt:coil:2.1.0")

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    //ExoPlayer
    implementation 'com.google.android.exoplayer:exoplayer-core:2.19.0'
    implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.0'
    implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.0'

    //Room
    implementation "androidx.room:room-runtime:2.5.2"
    implementation "androidx.room:room-ktx:2.5.2"
    kapt "androidx.room:room-compiler:2.5.2"

    //Webview
    implementation 'org.adblockplus:adblock-android-webview:3.14'

    //JSOUP
    implementation 'org.jsoup:jsoup:1.13.1'

    //Default
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}