apply plugin: 'com.android.application'
apply plugin: 'com.xuexiang.xaop' //引用xaop插件
apply plugin: 'img-optimizer'

android {
    compileSdkVersion build_versions.target_sdk
    buildToolsVersion build_versions.build_tools

    defaultConfig {
        applicationId "com.appspa.demo"
        minSdkVersion 14
        targetSdkVersion build_versions.target_sdk
        versionCode 3
        versionName "1.3"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }

    signingConfigs {
        debug {
            storeFile file("debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
        release {
            storeFile file("debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }

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

    if (project.hasProperty("RELEASE_STORE_FILE")) {
        applicationVariants.all { variant ->
            variant.outputs.all {
                if (variant.buildType.name.equals('release')) {
                    outputFileName = "app_space_${defaultConfig.versionName}.apk"
                }
            }
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    configurations.all {
        resolutionStrategy.force deps.okhttp3
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation deps.androidx.appcompat
    testImplementation deps.junit
    androidTestImplementation deps.runner
    androidTestImplementation deps.espresso.core
    implementation project(':app-space-update')

//    implementation 'com.github.appspa:app-space:1.0.0'
    //网络请求的实现一
    implementation 'com.zhy:okhttputils:2.6.2'
    implementation deps.gson
    implementation deps.okhttp3
    implementation 'io.reactivex.rxjava2:rxjava:2.2.20'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
}
