init
This commit is contained in:
156
app/build.gradle
Normal file
156
app/build.gradle
Normal file
@@ -0,0 +1,156 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
def appName() {
|
||||
return "应用市场"
|
||||
}
|
||||
|
||||
def releaseTime() {
|
||||
return new Date().format("yyyyMMdd", TimeZone.getDefault())
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
defaultConfig {
|
||||
applicationId "com.jiaoguanyi.appstore"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 26
|
||||
// versionCode 85
|
||||
// versionName "2.0.4.6"//正式jiaoguanyi.com
|
||||
versionCode 1
|
||||
versionName "1.0.0"//测试jiaoguanyi.cn
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
packagingOptions {
|
||||
exclude 'META-INF/rxjava.properties'
|
||||
}
|
||||
|
||||
/*********************************极光推送************************************/
|
||||
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
JPUSH_APPKEY : "20f70bbeb78bad23eddd08d0", //JPush上注册的包名对应的appkey.
|
||||
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
]
|
||||
/*********************************极光推送end************************************/
|
||||
}
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
//签名
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file("src/main/doc/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v2SigningEnabled false
|
||||
}
|
||||
release {// 签名文件
|
||||
storeFile file("src/main/doc/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v2SigningEnabled false
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
// 显示Log
|
||||
buildConfigField "boolean", "LOG_DEBUG", "true"
|
||||
versionNameSuffix "-debug"
|
||||
minifyEnabled false
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.debug
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||||
output.outputFileName = new File(outputFile.parent, fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
release {
|
||||
// 不显示Log
|
||||
buildConfigField "boolean", "LOG_DEBUG", "false"
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//签名
|
||||
signingConfig signingConfigs.release
|
||||
// 将release版本的包名重命名,加上版本及日期
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = ""
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-${defaultConfig.versionCode}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||||
output.outputFileName = new File(outputFile, fileName)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
def requested = details.requested
|
||||
if (requested.group == 'com.android.support') {
|
||||
if (!requested.name.startsWith("multidex")) {
|
||||
details.useVersion '27.1.1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
implementation 'com.facebook.rebound:rebound:0.3.8'
|
||||
implementation 'com.android.support:multidex:1.0.1'
|
||||
implementation 'com.github.bumptech.glide:glide:4.0.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.0'
|
||||
implementation 'com.alibaba:fastjson:1.2.18'
|
||||
implementation 'com.lzy.net:okgo:2.1.4'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
implementation 'com.lzy.net:okrx:0.1.2'
|
||||
implementation 'com.lzy.net:okserver:1.1.3'
|
||||
implementation 'com.android.support:appcompat-v7:27.0.2'
|
||||
implementation 'com.android.support:recyclerview-v7:27.0.2'
|
||||
implementation 'de.greenrobot:eventbus:2.4.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.0.7'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
|
||||
implementation 'com.google.code.gson:gson:2.2.4'
|
||||
|
||||
implementation 'cn.jiguang:jpush:2.2.0'
|
||||
|
||||
implementation "com.github.yjfnypeu:UpdatePlugin:3.0.1"
|
||||
|
||||
implementation 'com.blankj:utilcode:1.23.7'
|
||||
implementation 'com.arialyy.aria:aria-core:3.5.4'
|
||||
annotationProcessor 'com.arialyy.aria:aria-compiler:3.5.4'
|
||||
|
||||
implementation 'com.github.tianma8023:NetDetector:v0.2.0'
|
||||
implementation 'com.android.support:cardview-v7:26.1.0'
|
||||
implementation "org.java-websocket:Java-WebSocket:1.4.0"
|
||||
|
||||
implementation project(':RecyclerBanner-library')
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user