1: 输出格式
apply plugin: 'com.android.application'
def releaseTime() {
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.welleplus.yfinspection"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.all { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
// 输出apk名称为 Inspection_v1.0_20180517
def fileName = "Inspection_v${defaultConfig.versionName}_${releaseTime()}.apk"
outputFileName = fileName
}
}
}
}
}
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir "src/main/jniLibs"
}
}
}
2: 依赖
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// 数据解析
compile 'com.alibaba:fastjson:1.2.47'
compile 'com.alibaba:fastjson:1.1.68.android'
// 黄油刀
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// BRVAH
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
// compile 'com.android.support:multidex:1.0.1'
// 网络请求
compile 'com.tamic.novate:novate:1.5.5'
// 图片选择器
compile 'com.foamtrace:photopicker:1.0'
implementation 'com.android.support:design:27.1.1'
// 日历
compile 'com.haibin:calendarview:3.3.4'
// 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'
// }
// }
// }
// }
// 柱状图 饼状图
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
// 加载框
implementation 'com.github.d-max:spots-dialog:1.1@aar'
// 圆形
implementation 'de.hdodenhof:circleimageview:2.2.0'
// 二维码
compile(name: 'lib-zxing-release', ext: 'aar')
// 语音录制
compile "com.googlecode.mp4parser:isoparser:1.0.2"
compile "com.github.lassana:continuous-audiorecorder:1.3.2"
// 秒拍
compile 'com.mabeijianxi:small-video-record2:2.0.3@aar'
// 图片压缩
compile 'com.github.nanchen2251:CompressHelper:1.0.5'
// 播放网络视频
compile 'com.github.maning0303:MNVideoPlayer:V1.0.5'
// 权限请求 rxpermission 基于rxjava2
// implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
// implementation "io.reactivex.rxjava2:rxjava:2.2.0"
compile 'org.greenrobot:eventbus:3.1.1'
}
3:
allprojects { repositories { google() jcenter() mavenCentral() maven { url "https://jitpack.io" } flatDir { dirs 'libs' // aar目录 } } }