Android 用Gradle配置签名

path.store.file=E\:\\files\\codesrc\\signs\\testsigns.jks
path.alias.password=Flower
path.alias=Flower
path.store.password=Flower


 signingConfigs {
        release {
            def prpe = new Properties()
            def input = project.rootProject.file(‘local.properties‘).newInputStream();
            prpe.load(input)
            storeFile file(prpe.getProperty(‘path.store.file‘))
            storePassword prpe.getProperty(‘path.store.password‘)
            keyAlias prpe.getProperty(‘path.alias‘)
            keyPassword prpe.getProperty(‘path.alias.password‘)
        }
    }




    buildTypes {
        debug {
            debuggable true
            signingConfig signingConfigs.release
        }


        release {

            debuggable false
            signingConfig signingConfigs.release
            //是否混淆
            minifyEnabled true
            //是否移除无用资源
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt‘), ‘proguard-rules.pro‘
        }
    }

Android 用Gradle配置签名

上一篇:Android 各个组件学习


下一篇:C#开发微信门户及应用(22)-微信小店的开发和使用