apply plugin: 'com.android.application'
apply plugin: 'android-aspectjx'
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'com.zlx.plugin_lifecycle'


def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
    compileSdkVersion rootProject.ext.android.compileSdkVersion

    defaultConfig {
        applicationId "com.zlx.sharelive"
        minSdkVersion rootProject.ext.android.minSdkVersion
        targetSdkVersion rootProject.ext.android.targetSdkVersion
        versionCode rootProject.ext.android.versionCode
        versionName rootProject.ext.android.versionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: project.getName()]
            }
        }
    }

    signingConfigs {
        release {

            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['keystore'])
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }

        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    //开启dataBinding
    dataBinding{
        enabled true
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test:rules:1.3.0'


    implementation project(':library-base')
    implementation project(':library-widget')
    implementation project(':library-common')
    implementation project(':library-aop')
    if (!isRunModule.toBoolean()) {
        implementation project(':module-home')
        implementation project(':module-project')
        implementation project(':module-square')
        implementation project(':module-public')
        implementation project(':module-mine')
        implementation project(':module-web')
        implementation project(':module-login')
    }


    annotationProcessor rootProject.ext.dependencies.butterknifeCompiler
    annotationProcessor rootProject.ext.dependencies.arouterCompiler

}
