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

android {
    namespace 'com.pan_american.android'
    compileSdk 33

    buildFeatures {
        viewBinding true
    }

    defaultConfig {
        applicationId "com.pan_american.android"
        minSdk 24
        targetSdk 33
        versionCode 2
        versionName "1.0.1"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {

        release {
            storeFile file('Pan-American KeyStore.jks')
            storePassword('PanAmerican')
            keyAlias('Pan-American')
            keyPassword('PanAmerican')
        }
    }

    buildTypes {
        release {
            //启用代码混淆
//            minifyEnabled true
            // 启用资源压缩
//            shrinkResources true
            //混淆规则配置文件
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            signingConfig signingConfigs.release
        }

    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation 'com.android.tools:r8:8.3.37'

    implementation 'androidx.core:core-ktx:1.9.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'

    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.recyclerview:recyclerview:1.3.1'

    testImplementation 'junit:junit:4.13.2'

    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    //底部导航栏实现
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.3.1'

    //日历组件
    implementation 'com.haibin:calendarview:3.7.1'

    //Retrofit2
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    //SmartRefreshLayout
    implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0'
    implementation  'io.github.scwang90:refresh-header-classics:2.1.0'    //经典刷新头
    implementation  'io.github.scwang90:refresh-footer-classics:2.1.0'    //经典加载

    //EventBus
    implementation 'org.greenrobot:eventbus:3.3.1'

    //SignalR
    implementation 'com.microsoft.signalr:signalr:1.0.0'
}