apply plugin: 'com.android.application'

android {
    compileSdkVersion VERSION_COMPILE_SDK
    buildToolsVersion VERSION_BUILD_TOOLS

    defaultConfig {
        applicationId "com.didi.virtualapk.demo"
        minSdkVersion VERSION_MIN_SDK
        targetSdkVersion VERSION_TARGET_SDK
        versionName "1.0.0"
        versionCode 1
    }
    compileOptions {
        sourceCompatibility SOURCE_COMPATIBILITY
    }

    flavorDimensions "demo"
    productFlavors {
        beijing {
            dimension "demo"
            applicationId 'com.didi.virtualapk.demo'
        }
        shanghai {
            dimension "demo"
            applicationId 'com.didi.virtualapk.demo'
        }
    }

    signingConfigs {
        release {
            storeFile file("../../keystore/test.keystore")
            storePassword "test123456"
            keyAlias "test"
            keyPassword "test123456"
        }
    }

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

dependencies {
    // the following aars are also compiled in host project, so they will be filterd when build plugin apk.
    // but, wo can still visit their Class and Resources.
    implementation 'com.android.support:appcompat-v7:23.4.0'
//    implementation 'com.didi.virtualapk:core:0.9.8'
}

apply plugin: 'com.didi.virtualapk.plugin'

virtualApk {
    packageId = 0x6f // the package id of Resources.
    targetHost = '../../VirtualAPK/app' // the path of application module in host project.
    applyHostMapping = true //optional, default value: true.
}