plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlinx-serialization'
}

android {
    namespace 'com.flyjingfish.transform_plugin'
    compileSdk 33
    defaultConfig {
        applicationId "com.flyjingfish.transform_plugin"
        targetSdk 33
        versionCode 1
        versionName "1.0"


        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildFeatures {
        viewBinding true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    signingConfigs {
        release {
            storeFile file(rootProject.file("keystore"))
            storePassword '123456'
            keyAlias 'android_aop'
            keyPassword '123456'
        }
    }
    flavorDimensions.add("env")
    productFlavors {
        informal {
            dimension "env"
            signingConfig signingConfigs.release
        }
        product {
            dimension "env"
            signingConfig signingConfigs.release
        }
    }

    buildTypes {
        debug {
            ext.enableCrashlytics = false
            signingConfig signingConfigs.release
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        release {
            signingConfig signingConfigs.release
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        }
    }


    packagingOptions {
        exclude 'META-INF/kotlinx_coroutines_core.version'
    }

}

dependencies {
    implementation libs.core.ktx
    implementation libs.appcompat
    implementation libs.material
    debugImplementation libs.leakcanary
    implementation libs.bcprov.jdk15on
    implementation "com.squareup.retrofit2:retrofit:2.8.1"

    testImplementation libs.junit
    androidTestImplementation libs.androidx.test.ext.junit
    androidTestImplementation libs.espresso.core
    androidTestImplementation libs.androidx.rules
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
    implementation libs.gson
}
