build.gradle 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 28
  4. defaultConfig {
  5. applicationId "cn.dashoo.face"
  6. minSdkVersion 21
  7. targetSdkVersion 28
  8. versionCode 108
  9. versionName "1.0.8"
  10. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  11. ndk {
  12. abiFilters "arm64-v8a","armeabi-v7a"
  13. }
  14. //添加如下配置就ok了
  15. lintOptions {
  16. checkReleaseBuilds false
  17. abortOnError false
  18. }
  19. //release版本输出包名自动追加版本号和版本名称
  20. applicationVariants.all {
  21. variant ->
  22. variant.outputs.all {
  23. //只处理生产版本
  24. if (buildType.name == 'release') {
  25. def createTime = new Date().format("YYYYMMddHHmmss", TimeZone.getTimeZone("GMT+08:00"))
  26. // app包名称
  27. outputFileName = "LabSOPFace_V" + defaultConfig.versionName + "_" + createTime + "_" + buildType.name + ".apk"
  28. ////指定release输出到指定文件夹
  29. // variant.getPackageApplication().outputDirectory = new File(config.appReleaseDir + "/${createTime}")
  30. }
  31. }
  32. }
  33. }
  34. // buildToolsVersion "34.0.0"
  35. buildTypes {
  36. release {
  37. minifyEnabled false
  38. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  39. }
  40. }
  41. compileOptions {
  42. sourceCompatibility JavaVersion.VERSION_1_8
  43. targetCompatibility JavaVersion.VERSION_1_8
  44. }
  45. }
  46. dependencies {
  47. implementation fileTree(dir: 'libs', include: ['*.jar'])
  48. // implementation 'com.android.support:appcompat-v7:28.0.0'
  49. implementation 'androidx.appcompat:appcompat:1.1.0'
  50. implementation 'com.google.android.material:material:1.1.0'
  51. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  52. implementation 'org.jetbrains:annotations:15.0'
  53. testImplementation 'junit:junit:4.+'
  54. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  55. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  56. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  57. implementation 'com.jakewharton:butterknife:10.1.0'
  58. annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
  59. implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
  60. implementation 'com.squareup.okhttp3:okhttp:4.10.0'
  61. implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
  62. implementation 'com.github.chuckerteam.chucker:library:3.2.0'
  63. implementation 'com.squareup.okhttp3:okhttp:3.2.0'
  64. implementation 'com.squareup.okio:okio:1.7.0'
  65. implementation 'com.google.code.gson:gson:2.8.6'
  66. // implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
  67. // implementation('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }
  68. // implementation 'com.google.zxing:core:3.3.0'
  69. // implementation 'com.github.HuanTanSheng:EasyPhotos:2.3.4'
  70. // implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
  71. // implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
  72. // implementation 'com.github.bumptech.glide:glide:4.8.0'
  73. // implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
  74. implementation 'org.greenrobot:eventbus:3.2.0'
  75. // implementation 'com.android.support:appcompat-v7:28.0.0'
  76. // androidTestImplementation 'com.android.support.test:runner:1.0.2'
  77. // androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  78. // implementation 'com.android.support:recyclerview-v7:28.0.0'
  79. implementation 'com.github.bumptech.glide:glide:4.9.0'
  80. implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
  81. implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
  82. implementation project(path: ':DaemonService')
  83. implementation project(path: ':library')
  84. }