build.gradle 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. apply plugin: 'kotlin-android-extensions'
  6. apply plugin: 'kotlin-kapt'
  7. kapt {
  8. arguments {
  9. arg("AROUTER_MODULE_NAME", project.getName())
  10. // 是否生成路由文档,"enable":生成文档,其他字符串不生成路由文档
  11. arg("AROUTER_GENERATE_DOC", "enable")
  12. }
  13. }
  14. android {
  15. compileSdkVersion 31
  16. defaultConfig {
  17. applicationId "com.cooleshow.teacher"
  18. minSdkVersion 21
  19. targetSdkVersion 31
  20. versionCode 1
  21. versionName "1.0"
  22. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled false
  27. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  28. buildConfigField "String", "BASE_H5_URL", RELEASE_BASE_URL_H5
  29. }
  30. debug{
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. buildConfigField "String", "BASE_H5_URL", TEST_BASE_URL_H5
  34. }
  35. }
  36. compileOptions {
  37. sourceCompatibility JavaVersion.VERSION_1_8
  38. targetCompatibility JavaVersion.VERSION_1_8
  39. }
  40. kotlinOptions {
  41. jvmTarget = '1.8'
  42. }
  43. buildFeatures{
  44. viewBinding = true
  45. }
  46. }
  47. dependencies {
  48. implementation 'androidx.core:core-ktx:1.7.0'
  49. implementation 'androidx.appcompat:appcompat:1.3.0'
  50. implementation 'com.google.android.material:material:1.4.0'
  51. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  52. testImplementation 'junit:junit:4.13.2'
  53. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  54. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  55. implementation project(':Provider')
  56. implementation project(path: ':BaseLibrary')
  57. api project(path: ':usercenter')
  58. implementation "com.alibaba:arouter-api:$arouter_api_version"
  59. kapt "com.alibaba:arouter-compiler:$arouter_api_version"
  60. }