build.gradle 1.3 KB
Newer Older
A
asure 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
if (isPluginBuild == "true") {
    apply plugin: 'com.android.application'
} else {
    apply plugin: 'com.android.library'
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    buildToolsVersion '26.0.2'

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        if (isPluginBuild == "true"){
            applicationId "com.jason.plugin.two"
        }



26 27 28 29 30 31 32 33 34 35
    }

    signingConfigs{
        release{
            storeFile file("../plugin_key.jks")
            storePassword "plugin"
            keyAlias "plugin"
            keyPassword "plugin"
        }

A
asure 已提交
36 37 38 39 40
    }

    buildTypes {
        release {
            minifyEnabled false
41
            signingConfig signingConfigs.release
A
asure 已提交
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation project(path : ':commom')
}
if (isPluginBuild == "true"){
    apply plugin: 'com.didi.virtualapk.plugin'

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