as-build.gradle

apply plugin: 'com.android.application'
//apply plugin: 'bugly'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.tencent.avsdk"
        minSdkVersion 8
        targetSdkVersion 22
        versionCode = 1
        versionName = "v1.0"
    }


    signingConfigs {
        release {
            storeFile file("../build/target/product/security/testAndroidKey")
            storePassword "1234"
            keyAlias "aaa"
            keyPassword "1234"
        }
    }

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

    lintOptions {
        abortOnError false
    }

    productFlavors {
        dev {
            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "dev"]
        }
        wandoujia {
            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "wandoujia"]
        }
        xiaomi {
            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "xiaomi"]
        }
        "360" {
            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "360"]
        }

        /**
         * //manifest:<meta-data android:name="UMENG_CHANNEL" android:value="${UMENG_CHANNEL_VALUE}" />
         * 更简洁方案
         productFlavors {
             wandoujia {}
             baidu {}
             c360 {}
             uc {}
             productFlavors.all { flavor ->
             flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
             }
         }
         * */
    }

    // rename the apk with the version name
    // add output file sub folder by build type
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            output.outputFile = new File(
                    output.outputFile.parent + "/${variant.buildType.name}",
                    "rx-${variant.buildType.name}-${variant.versionName}-${variant.productFlavors[0].name}.apk".toLowerCase())
        }
    }

}

dependencies {
    //compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:22.1.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile files('libs/httpmime-4.1.1.jar')
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值