build.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. apply from: "dependent.gradle"
  3. apply from: "config.gradle"
  4. buildscript {
  5. ext.kotlin_version = '1.5.31'
  6. ext.booster_version = '4.4.0'
  7. repositories {
  8. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  9. google()
  10. maven { url 'https://jitpack.io' }
  11. mavenCentral()
  12. jcenter()
  13. }
  14. dependencies {
  15. classpath 'com.android.tools.build:gradle:7.0.3'
  16. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  17. //ARouter路由自动注册启动优化
  18. classpath 'com.alibaba:arouter-register:1.0.2'
  19. //Hilt插件
  20. classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
  21. // ==================== Booster优化插件 ====================
  22. // 基础框架
  23. classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version"
  24. // 多线程优化
  25. classpath "com.didiglobal.booster:booster-transform-thread:$booster_version"
  26. // WebView 预加载
  27. classpath "com.didiglobal.booster:booster-transform-webview:$booster_version"
  28. // SharedPreferences 优化
  29. classpath "com.didiglobal.booster:booster-transform-shared-preferences:$booster_version"
  30. // 资源压缩
  31. classpath "com.didiglobal.booster:booster-task-compression-cwebp:$booster_version"
  32. // 文件压缩
  33. // classpath "com.didiglobal.booster:booster-task-compression-processed-res:$booster_version"
  34. // 去冗余资源
  35. classpath "com.didiglobal.booster:booster-task-resource-deredundancy:$booster_version"
  36. // 资源索引内联
  37. classpath "com.didiglobal.booster:booster-transform-r-inline:$booster_version"
  38. // 修复 finalizer 导致的 TimeoutException
  39. classpath "com.didiglobal.booster:booster-transform-finalizer-watchdog-daemon:$booster_version"
  40. // 检查覆盖安装导致的 Resources 和 Assets 未加载的 Bug
  41. classpath "com.didiglobal.booster:booster-transform-res-check:$booster_version"
  42. // 修复 Toast 在 Android 7.1 上的 Bug
  43. classpath "com.didiglobal.booster:booster-transform-toast:$booster_version"
  44. // 处理系统 Crash
  45. classpath "com.didiglobal.booster:booster-transform-activity-thread:$booster_version"
  46. }
  47. }
  48. task clean(type: Delete) {
  49. delete rootProject.buildDir
  50. }