Booster is an easy-to-use, lightweight, powerful and extensible quality optimization toolkit designed specially for mobile applications. The primary goal is to solve quality problems with the increase of APP complexity, such as performance, stability, and package size, etc.
Booster provides a collection of modules for performance detection, multithreading optimization, resources index inline, redundant resources reduction, resources compression, system bug fixing, etc. Using booster, the stability of application can be increased by 15% ~ 25%, and the package size can be reduced by 1MB ~ 10MB.
Booster �?�一款专门为移动应用设计的�?�用�?轻量级且可扩展的质量�?化框架,其目标主�?�?�为了解决随着 APP 复杂度的�?升而带来的性�?��?稳定性�?包体积等一系�?�质量问�?。
Booster �?供了性�?�检测�?多线程�?化�?资�?索引内�?��?资�?去冗余�?资�?压缩�?系统 Bug 修复等一系�?�功�?�模块,可以使得稳定性�?�够�?升 15% ~ 25%,包体积可以减小 1MB ~ 10MB。
-
Performance detection | 性�?�检测
Potential performance issues could be found by using Booster, for example, calling APIs that may block the UI thread or main thread, such as I/O APIs. About the details
使用 Booster 可以发现潜在的性�?�问�?,例如,在应用中�?用可�?��?�塞 UI 线程�?�者主线程的 API,如:I/O API 等。
-
Performance optimization | 性�?��?化
Thread management has always been a problem for developers, especially the threads started by third-party SDKs, starting too many threads may cause OOM, fortunately, these issues can be solved by Booster. About the details, please see booster-transform-thread。
对于开发者来说,线程管�?�一直�?�个头疼的问�?,特�?��?�第三方 SDK 中的线程,过多的线程可�?�会导致内�?不足,然而幸�?的�?�,这些问�?�?��?�通过 Booster 来解决。
-
System bugs fix | 系统问�?修复
Such as fixing the crash caused by
Toastglobally on Android API 25. About the details, please see booster-transform-toast.例如全局性地修复 Android API 25 �?本中
Toast导致的崩�?。详�?�请参�?:booster-transform-toast. -
Package size reduction | 应用�?�身
Such as r inline, etc.
如:资�?索引内�?�。
-
Other things you can imagine | 其�?你�?��?��?�得�?�的
- JDK (minimum version required is
JDK 1.8,JDK 11is recommended) - Gradle version
4.10+ - Android Gradle Plugin version
3.3+
The following table lists which version of Gradle is required for each version of the Android Gradle plugin. For the best performance, please use the latest possible version of both Gradle and the plugin.
下表�?�出了�?�个 Android Gradle 插件�?本所需的 Gradle �?本。�?获得最佳性�?�,请使用 Gradle 和插件这两者的最新�?本。
| Android Gradle Plugin | Gradle | Booster |
|---|---|---|
| 8.5 | 8.7+ | N/A |
| 8.4 | 8.6+ | N/A |
| 8.3 | 8.4+ | N/A |
| 8.2 | 8.2+ | 5.0.0+ |
| 8.1 | 8.0+ | 5.0.0+ |
| 8.0 | 8.0+ | 5.0.0+ |
| 7.4 | 7.5+ | 4.16.3+ |
| 7.3 | 7.4+ | 4.15.0+ |
| 7.2 | 7.3.3+ | 4.10.0+ |
| 7.1 | 7.1+ | 4.10.0+ |
| 7.0 | 7.0+ | 4.0.0+ |
| 4.2.0+ | 6.7.1+ | 3.2.0+ |
| 4.1.0+ | 6.5+ | 3.0.0+ |
| 4.0.0+ | 6.1.1+ | 2.0.0+ |
| 3.6.0 - 3.6.4 | 5.6.4+ | 1.0.0+ |
| 3.5.0 - 3.5.4 | 5.4.1+ | 1.0.0+ |
| 3.4.0 - 3.4.3 | 5.1.1+ | 1.0.0+ |
| 3.3.0 - 3.3.3 | 4.10.1+ | 0.1.0+ |
The best practise of using Booster is integrating the specific module to solve the problems you have encountered as following:
集�?? Booster 的最佳方式�?�集�??真正需�?的模块来解决项目中�?��?�的特定问�?。
buildscript {
ext.booster_version = '5.0.0'
repositories {
google()
mavenCentral()
// OPTIONAL If you want to use SNAPSHOT version, sonatype repository is required.
maven { url 'https://oss.sonatype.org/content/repositories/public' }
}
dependencies {
classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version" // ①
// ② figure out the features you really need, then choose the right module for integration
// ② 弄清楚真正需�?的特性,然�?�从下面的模块�?�表中选择正确的模块进行集�??
}
}
allprojects {
repositories {
google()
mavenCentral()
// OPTIONAL If you want to use SNAPSHOT version, sonatype repository is required.
maven { url 'https://oss.sonatype.org/content/repositories/public' }
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.didiglobal.booster' // ③Then using the following command in terminal to check if Booster enabled
然�?�在�?端用如下命令来确认 Booster �?��?��?�用:
./gradlew assembleDebug --dry-runIf transformClassesWithBoosterForDebug can be found in the output, it means Booster is enabled. Congratulations! 🎉🎉🎉
如果在命令行输出中�?��?��?� transformClassesWithBoosterForDebug 说�?� Booster 已经�?�用了,那�?�?�喜你�? 🎉🎉🎉
The plugins DSL also supported since Booster 3.0.0
Booster 从 3.0.0 开始支�?
pluginsDSL 的方式来�?�用
plugins {
id 'com.didiglobal.booster' version '5.0.0'
}Due to AGP 8's incompatible changes, AGP 7.x and below are no longer supported, if you are still using AGP 7.x, please use Booster 4.x
由于 AGP 8 的不兼容性�?更,AGP 7.x 及以下�?本已经不再支�?,如果你仍在使用 AGP 7.x,请使用 Booster 4.x
Most Task based modules are no longer supported in Booster 5.0.0, however, the Transform based modules are still supported without breaking changes.
大�?��?�基于
Task的模块在 Booster 5.0.0 中已经不再支�?,但�?�基于Transform的模块仍然支�?且没有破坏性�?更。
About the details, please see Migrate from Booster 4.x to 5.x
详�?�请参�? [从 Booster 4.x �?移�?� 5.x](https://booster.johnsonlee.io/zh/migration
About the details, please see Booster Inside�?深入�?�解 Booster)
About the API reference, please see Booster API Reference
Welcome to contribute by creating issues or sending pull requests. See Contributing Guideline.
欢迎大家以 issue �?�者 pull request 的形式为本项目作贡献。详�? Contributing Guideline。
Booster is licensed under the Apache License 2.0.



