apply plugin: 'com.android.application' def releaseTime() { return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC")) } android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.dawangye2.app" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "1.0" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } } signingConfigs { config { keyAlias 'dawangye2' keyPassword 'dawangye' storeFile file('dawangye2.jks') storePassword 'dawangye' } } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } android.applicationVariants.all { variant -> variant.outputs.all { output -> // 格式化输出 apk 名称 output.outputFileName = "dwy2_v${variant.versionName}_${releaseTime()}.apk" } } } compileOptions { sourceCompatibility = 1.8 targetCompatibility = 1.8 } sourceSets { main { jniLibs.srcDirs = ['libs'] } } repositories { flatDir { dirs 'libs' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' api 'com.lzy.net:okgo:3.0.4' api 'com.google.code.gson:gson:2.8.0' api 'com.jakewharton:butterknife:10.2.3' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3' implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50' implementation 'com.github.tbruyelle:rxpermissions:0.10.2' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'com.polidea.rxandroidble2:rxandroidble:1.11.1' implementation 'androidx.cardview:cardview:1.0.0' /* implementation 'com.orhanobut:hawk:2.0.1'*/ api 'com.kaopiz:kprogresshud:1.2.0' api 'com.contrarywind:wheelview:4.1.0' api 'com.github.SheHuan:NiceDialog:1.2.0' implementation 'com.github.zcweng:switch-button:0.0.3@aar' api 'com.tencent.bugly:crashreport:latest.release' // //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9 api 'com.tencent.bugly:nativecrashreport:latest.release' // //其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0 implementation 'javax.annotation:javax.annotation-api:1.2' implementation "org.projectlombok:lombok:1.18.12" implementation 'org.greenrobot:eventbus:3.1.1' implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.2' implementation 'com.contrarywind:Android-PickerView:4.1.8' implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'io.github.xmaihh:serialport:2.1.1' implementation 'com.google.android.exoplayer:exoplayer-core:2.15.1' implementation 'com.google.android.exoplayer:exoplayer-ui:2.15.1' implementation 'com.android.support:multidex:1.0.3' //摄像头预览库 implementation "androidx.camera:camera-core:1.3.0-alpha04" // CameraX Camera2 extensions[可选]拓展库可实现人像、HDR、夜间和美颜、滤镜但依赖于OEM implementation "androidx.camera:camera-camera2:1.3.0-alpha04" // CameraX Lifecycle library[可选]避免手动在生命周期释放和销毁数据 implementation "androidx.camera:camera-lifecycle:1.3.0-alpha04" // CameraX View class[可选]最佳实践,最好用里面的PreviewView,它会自行判断用SurfaceView还是TextureView来实现 implementation 'androidx.camera:camera-view:1.3.0-alpha04' implementation(name: 'printer-lib-3.1.6', ext: 'aar') implementation 'com.github.Jasonchenlijian:FastBle:2.4.0' }