学考乐离线App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. plugins {
  2. id 'com.android.library'
  3. id 'kotlin-android'
  4. id 'kotlin-kapt'
  5. }
  6. android {
  7. compileSdk rootProject.ext.android.compile_sdk_version
  8. buildToolsVersion rootProject.ext.android.build_tools_version
  9. defaultConfig {
  10. minSdk rootProject.ext.android.min_sdk_version
  11. targetSdk rootProject.ext.android.target_sdk_version
  12. versionCode 1
  13. versionName "1.0"
  14. // multiDexEnabled true
  15. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16. consumerProguardFiles "consumer-rules.pro"
  17. }
  18. buildTypes {
  19. release {
  20. buildConfigField("Boolean","LOG_ENABLE","false")
  21. buildConfigField("Boolean","SHOW_LIFECYCLER_LOG","false")
  22. minifyEnabled false
  23. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  24. }
  25. debug {
  26. buildConfigField("Boolean","LOG_ENABLE","true")
  27. buildConfigField("Boolean","SHOW_LIFECYCLER_LOG","false")
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  30. }
  31. }
  32. compileOptions {
  33. coreLibraryDesugaringEnabled true
  34. sourceCompatibility JavaVersion.VERSION_1_8
  35. targetCompatibility JavaVersion.VERSION_1_8
  36. }
  37. kotlinOptions {
  38. jvmTarget = '1.8'
  39. }
  40. buildFeatures {
  41. viewBinding true
  42. dataBinding true
  43. }
  44. }
  45. dependencies {
  46. // implementation fileTree(include: ['*.jar',"*.aar"], dir: 'libs')
  47. // implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  48. rootProject.ext.dependencies_required.each{ k, v -> implementation v}
  49. testImplementation rootProject.ext.dependencies_testImplementation.junit
  50. rootProject.ext.dependencies_androidTestImplementation.each{ k,v -> androidTestImplementation v}
  51. def customDependencies = rootProject.ext.dependencies_custom
  52. //Activity-ktx 扩展
  53. api customDependencies.Activity_ktx
  54. //状态栏
  55. api customDependencies.UltimateBarX
  56. //glide
  57. api customDependencies.Glide
  58. kapt customDependencies.GlideCompiler
  59. //glide translation
  60. api customDependencies.GlideTranslation
  61. //RxJava RxAndroid
  62. // api customDependencies.RxJava
  63. // api customDependencies.RxAndroid
  64. coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
  65. //MMKV
  66. api customDependencies.MMKV
  67. // liveEventBus
  68. api customDependencies.liveEventBus
  69. // okhttp
  70. api customDependencies.Okhttp
  71. api customDependencies.OkhttpLoggingIntercepter
  72. api customDependencies.Retrofit
  73. // api customDependencies.RetrofitScalars
  74. // api customDependencies.RetrofitGson
  75. // api customDependencies.RetrofitProtobuf
  76. api customDependencies.Rxjava
  77. api customDependencies.RxAndroid
  78. api customDependencies.Retrofit2Rxjava3Adapter
  79. }