
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

ext {
    kotlin_version = "1.8.20"
}
apply from:'maven_publish.gradle' //依赖 maven 发布脚本
android {
    compileSdkVersion 33
//    The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum
// supported version (26.0.2) for Android Gradle Plugin 3.0.1.
//    Android SDK Build Tools 26.0.2 will be used.
//    To suppress this warning, remove "buildToolsVersion '25.0.3'" from your build.gradle file,
// as each version of the Android Gradle Plugin now has a default version of the build tools.


    defaultConfig {
//        minSdkVersion 17//14-->17
        minSdkVersion 19//17-->(19: Android 4.4)
//        targetSdkVersion 29
        targetSdkVersion 33 //Android 13
    }
    buildTypes {
        release {
            minifyEnabled true
            consumerProguardFile 'proguard-rules.pro' //暂时不用吧
//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    namespace 'common.base'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
    kotlin {
//        jvmToolchain(8)
        jvmToolchain(17)
    }
    publishing {
        singleVariant('release') {
            //源码
            withSourcesJar()
            //java 文档: 会对各类生成 html文档
//            withJavadocJar()
        }
    }

    lintOptions {
        abortOnError false
    }
}
//repositories {
//    flatDir {
//        dirs 'libs'
//    }
//    google()
//    mavenCentral()
//}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //This artifact and its classes are deprecated. Use LiveData or reactive streams instead.
    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
    testImplementation 'junit:junit:4.13.2'
    api 'androidx.appcompat:appcompat:1.6.1'
    api 'com.google.android.material:material:1.8.0'
    api 'androidx.recyclerview:recyclerview:1.3.0'
    api 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    api 'com.squareup.retrofit2:retrofit:2.9.0' // -> 2.9.0 (最新：2020-5月的)
    api 'com.squareup.retrofit2:converter-jackson:2.9.0'

//    Glide v4 need a minimum API level of 14.
//    Glide v4 requires you to compile against API 26 or later
    //建议使用implementation，这样的好处是编译速度会加快。如果需要提供外部访问的时候，使用api即可
    //implementation 'com.github.bumptech.glide:glide:4.15.1'
    api 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
    implementation "com.github.bumptech.glide:okhttp3-integration:4.12.0"
    api 'io.github.feer921:XSelector:1.2'//一个使用代码设置各控件的选中、点击、使能状态的库以减少drawalbe越来越多的xml文件
    implementation "androidx.core:core-ktx:1.9.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0' // kotlin coroutines 协程
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1"
    // 2.6.1
    api 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
    api 'com.tencent:mmkv:1.3.0' //腾讯的　MMKV持久化框架，替换系统原生的　SP
}
