apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
    signingConfigs {
        release {
            storeFile file('../keystore/fxgl')
            storePassword 'muchinfo'
            keyAlias 'fxgl'
            keyPassword 'muchinfo'
        }
    }
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "cn.muchinfo.rma"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        //指定room.schemaLocation生成的文件路径
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [moduleName: project.getName()]
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/metadata.kotlin_module'
        exclude 'META-INF/metadata.jvm.kotlin_module'
    }

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

    applicationVariants.all { variant ->
        variant.outputs.all {
            //在这里修改apk文件名
            outputFileName = "fxgl-${variant.name}-v${variant.versionName}.apk"
        }
    }

}

dependencies {

    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'io.coil-kt:coil:1.0.0-rc3'
    implementation 'com.afollestad.material-dialogs:lifecycle:3.1.1'
    implementation 'com.afollestad.material-dialogs:core:3.1.1'
    implementation 'com.blankj:utilcodex:1.29.0'
    implementation 'com.squareup.retrofit2:retrofit:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.0'

    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0'
    implementation 'androidx.annotation:annotation:1.1.0'

    implementation "androidx.room:room-runtime:2.2.5"
    kapt "androidx.room:room-compiler:2.2.5"

//    api 'androidx.room:room-ktx:2.2.5'
//    testImplementation 'androidx.room:room-testing:2.2.5'

    api "org.jetbrains.anko:anko-commons:0.10.8"
    api "org.jetbrains.anko:anko-sdk25-coroutines:0.10.8"
    api "org.jetbrains.anko:anko-appcompat-v7:0.10.8"
    api "org.jetbrains.anko:anko-recyclerview-v7:0.10.8"
    api "org.jetbrains.anko:anko-recyclerview-v7-coroutines:0.10.8"
    api "org.jetbrains.anko:anko-design:0.10.8"
    api "org.jetbrains.anko:anko-percent:0.10.8"
    api "org.jetbrains.anko:anko-sdk25:0.10.8"

    // qq的综合性的ui框架
    implementation "com.qmuiteam:qmui:2.0.0-alpha02"
    implementation "com.qmuiteam:arch:2.0.0-alpha02"
//    kapt "com.qmuiteam:arch-compiler:2.0.0-alpha02"
    implementation 'com.alibaba:fastjson:1.1.56.android'
    api "com.jakewharton.rxbinding2:rxbinding:2.0.0"
    // 稳定版的下拉刷新框架
    api 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14'
    // 强大的RecyclerAdapter框架
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
    //防止rxjava 持有activity 或 fragment对象  导致内存泄漏
    implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.1'
    implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.1'
    implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.1'
    implementation 'android.arch.persistence.room:rxjava2:1.1.1'
    implementation files('libs/glide-full-4.7.0.jar')

    implementation files('libs/tbs_sdk_thirdapp_v3.2.0.1104_43200_sharewithdownload_withfilereader_withoutGame_obfs_20170609_115346.jar')
    //banner 控件
    implementation 'cn.bingoogolapple:bga-banner:3.0.0@aar'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.facebook.fresco:fresco:2.0.0'
    //选择器控件
//    api 'com.contrarywind:Android-PickerView:4.1.9'

    api 'com.github.Liberuman:ShadowDrawable:0.1'
    implementation "com.jakewharton:butterknife:10.0.0"
    annotationProcessor "com.jakewharton:butterknife-compiler:10.0.0"
    implementation 'com.zhy:okhttputils:2.6.2'
    // rx运行时权限框架
    api 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
    // 版本更新框架
    implementation 'com.github.czy1121:update:1.1.1'
    // Protobuf
    implementation 'com.google.protobuf:protobuf-java:3.11.4'
    implementation 'com.google.guava:guava:23.6-jre'
    implementation 'com.github.Vincent7Wong:EasyNavigation:2.0.5'

    //kotlin 协程
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
    //eventbus
    implementation 'org.greenrobot:eventbus:3.2.0'

}