Skip to content

Instantly share code, notes, and snippets.

@LeonDevLifeLog
Created September 14, 2017 13:48
Show Gist options
  • Save LeonDevLifeLog/f8bc8a895bd5b796be30e6190411b2cc to your computer and use it in GitHub Desktop.
Save LeonDevLifeLog/f8bc8a895bd5b796be30e6190411b2cc to your computer and use it in GitHub Desktop.
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.***************************.shb"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName '1.0.0'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
// 设置支持的SO库架构
abiFilters 'armeabi'
}
//配置一些静态全局参数(app key,secret key 等)
buildConfigField "String", "sameVariable", "\"sameValue\""
manifestPlaceholders = [
JPUSH_PKGNAME: applicationId,
JPUSH_APPKEY : "123123", //JPush上注册的包名对应的appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
}
dataBinding {
enabled = true
}
signingConfigs {
release {
storeFile project.rootProject.file('key/****.jks')//签名文件
//签名参数
storePassword ""
keyAlias ""
keyPassword ""
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
signingConfig signingConfigs.release
buildConfigField "String", "variable", "\"test\"" //测试版变量
manifestPlaceholders = [app_name : "@string/app_name_debug_version"//测试版App名字
, app_icon: "@mipmap/ic_launcher_debug"] //测试版App icon
}
release {
minifyEnabled false
shrinkResources false
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
manifestPlaceholders = [app_name : "@string/app_name" //正式版App名字
, app_icon: "@mipmap/ic_launcher"] //正式版App icon
buildConfigField "String", "variable", "\"variable\""//测试版变量
}
}
productFlavors {
}
configurations {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment