apply plugin: 'com.android.application'
apply plugin: "com.dovar.router.plugin" //必须在apply plugin: 'com.android.application'之后，否则找不到AppExtension

buildscript {
    repositories {
        google()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "gradle.plugin.RouterPlugin:plugin:2.0.1"
    }
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "com.dovar.app"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName
    }

    resourcePrefix "app_"//增加资源命名前缀


    buildTypes {
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
        }
    }

    flavorDimensions "default"
    productFlavors {
        demo {
            dimension "default" //必须为flavorDimensions中的任一值
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

dependencies {
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

    //公共服务层
    implementation project(':common_service')

    //开发阶段可以根据需要，选择下面的一个或多个组件进行编译，减少编译时长
    //但发布测试或生产包时必须全部编译
    implementation project(':module_a')
    implementation project(':module_b')
    implementation project(':module_c')
}