build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. compileSdk 31
  16. defaultConfig {
  17. applicationId "com.example.cooleshow"
  18. minSdk 21
  19. targetSdk 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. }
  29. }
  30. compileOptions {
  31. sourceCompatibility JavaVersion.VERSION_1_8
  32. targetCompatibility JavaVersion.VERSION_1_8
  33. }
  34. packagingOptions {
  35. resources.excludes.add("META-INF/*")
  36. }
  37. kotlinOptions {
  38. jvmTarget = '1.8'
  39. }
  40. }
  41. dependencies {
  42. testImplementation 'junit:junit:4.13.2'
  43. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  44. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  45. implementation project(':Provider')
  46. implementation project(path: ':BaseLibrary')
  47. if (isUserModule.toBoolean()){
  48. implementation project(path:':usercenter')
  49. }
  50. implementation "com.alibaba:arouter-api:$arouter_api_version"
  51. kapt "com.alibaba:arouter-compiler:$arouter_api_version"
  52. }