build.gradle 2.9 KB

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