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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| apply plugin: 'com.android.application'
android { compileSdkVersion 25 buildToolsVersion "23.0.2"
defaultConfig { applicationId "me.sxwang.explore" minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' manifestPlaceholders = [CHANNEL: "official"] } } productFlavors { wandoujia { manifestPlaceholders = [CHANNEL: "wandoujia"] } xiaomi { manifestPlaceholders = [CHANNEL: "xiaomi"] } } productFlavors.each { flavor -> println("====> Configuring productFlavor: ${flavor.name}") flavor.manifestPlaceholders = [CHANNEL: flavor.name] } applicationVariants.all { variant -> println("====> Configuring variant: ${variant.name}") variant.assemble.dependsOn.each { dependency -> println(dependency) } variant.outputs.each { output -> output.outputFile = new File(output.outputFile.parent, "x-${variant.name}.apk") } variant.assemble.doFirst { println("====> doFirst: ${variant.name}") } } }
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:25.1.0' compile 'com.android.support:design:25.1.0' }
|