{"id":3739,"url":"https://github.com/didi/booster","last_synced_at":"2025-05-12T13:21:18.596Z","repository":{"id":37445151,"uuid":"182968735","full_name":"didi/booster","owner":"didi","description":"🚀Optimizer for mobile applications","archived":false,"fork":false,"pushed_at":"2025-04-12T03:21:22.000Z","size":11911,"stargazers_count":4980,"open_issues_count":50,"forks_count":590,"subscribers_count":113,"default_branch":"master","last_synced_at":"2025-05-12T13:21:13.591Z","etag":null,"topics":["android","bytecode-manipulation","gradle-plugin","optimizer","static-analysis"],"latest_commit_sha":null,"homepage":"https://booster.johnsonlee.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-23T08:23:13.000Z","updated_at":"2025-05-10T03:05:36.000Z","dependencies_parsed_at":"2023-02-09T14:01:10.514Z","dependency_job_id":"1c3f9be3-30d1-4539-bbc9-a7abaef3397c","html_url":"https://github.com/didi/booster","commit_stats":{"total_commits":626,"total_committers":16,"mean_commits":39.125,"dds":"0.11821086261980829","last_synced_commit":"d62ca3afa231719fd285e3d196d1f9f810ca3182"},"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fbooster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fbooster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fbooster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fbooster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didi","download_url":"https://codeload.github.com/didi/booster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745197,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bytecode-manipulation","gradle-plugin","optimizer","static-analysis"],"created_at":"2024-01-05T20:16:50.039Z","updated_at":"2025-05-12T13:21:18.575Z","avatar_url":"https://github.com/didi.png","language":"Kotlin","readme":"![Booster](assets/booster-logo.png)\n\n![GitHub](https://img.shields.io/github/license/didi/booster.svg?style=for-the-badge)\n![GitHub Release](https://img.shields.io/github/release/didi/booster.svg?style=for-the-badge)\n\n## Overview | 概览\n\nBooster 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.\n\nBooster 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.\n\n\u003e  Booster 是一款专门为移动应用设计的易用、轻量级且可扩展的质量优化框架，其目标主要是为了解决随着 APP 复杂度的提升而带来的性能、稳定性、包体积等一系列质量问题。\n\u003e\n\u003e Booster 提供了性能检测、多线程优化、资源索引内联、资源去冗余、资源压缩、系统 Bug 修复等一系列功能模块，可以使得稳定性能够提升 15% ~ 25%，包体积可以减小 1MB ~ 10MB。\n\n## What can Booster be used for? | Booster 能做什么？\n\n- Performance detection | 性能检测\n\n  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\n\n  \u003e 使用 Booster 可以发现潜在的性能问题，例如，在应用中调用可能阻塞 UI 线程或者主线程的 API，如：I/O API 等。\n\n- Performance optimization | 性能优化\n\n  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](./booster-transform-thread)。\n\n  \u003e 对于开发者来说，线程管理一直是个头疼的问题，特别是第三方 SDK 中的线程，过多的线程可能会导致内存不足，然而幸运的是，这些问题都能通过 Booster 来解决。\n\n- System bugs fix | 系统问题修复\n\n  Such as fixing the crash caused by `Toast` globally on [Android API 25](https://developer.android.com/studio/releases/platforms#7.1). About the details, please see [booster-transform-toast](./booster-transform-toast).\n\n  \u003e 例如全局性地修复 [Android API 25](https://developer.android.com/studio/releases/platforms#7.1) 版本中 `Toast` 导致的崩溃。详情请参见：[booster-transform-toast](./booster-transform-toast).\n\n- Package size reduction | 应用瘦身\n\n  Such as [r inline](./booster-transform-r-inline), etc.\n\n  \u003e 如：[资源索引内联](./booster-transform-r-inline)。\n\n- Other things you can imagine | 其它你能想像得到的\n\n## Prerequisite | 先决条件\n\n- JDK (minimum version required is `JDK 1.8`, `JDK 11` is recommended)\n- Gradle version `4.10+`\n- Android Gradle Plugin version `3.3+`\n\nThe 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.\n\n\u003e 下表列出了各个 Android Gradle 插件版本所需的 Gradle 版本。要获得最佳性能，请使用 Gradle 和插件这两者的最新版本。\n\n| Android Gradle Plugin | Gradle  | Booster |\n|:---------------------:|:-------:|:-------:|\n|          8.5          |  8.7+   |   N/A   |\n|          8.4          |  8.6+   |   N/A   |\n|          8.3          |  8.4+   |   N/A   |\n|          8.2          |  8.2+   | 5.0.0+  |\n|          8.1          |  8.0+   | 5.0.0+  |\n|          8.0          |  8.0+   | 5.0.0+  |\n|          7.4          |  7.5+   | 4.16.3+ |\n|          7.3          |  7.4+   | 4.15.0+ |\n|          7.2          | 7.3.3+  | 4.10.0+ |\n|          7.1          |  7.1+   | 4.10.0+ |\n|          7.0          |  7.0+   | 4.0.0+  |\n|        4.2.0+         | 6.7.1+  | 3.2.0+  |\n|        4.1.0+         |  6.5+   | 3.0.0+  |\n|        4.0.0+         | 6.1.1+  | 2.0.0+  |\n|     3.6.0 - 3.6.4     | 5.6.4+  | 1.0.0+  |\n|     3.5.0 - 3.5.4     | 5.4.1+  | 1.0.0+  |\n|     3.4.0 - 3.4.3     | 5.1.1+  | 1.0.0+  |\n|     3.3.0 - 3.3.3     | 4.10.1+ | 0.1.0+  |\n\n## Best Practise | 最佳实践\n\nThe best practise of using Booster is integrating the specific module to solve the problems you have encountered as following:\n\n\u003e 集成 Booster 的最佳方式是集成真正需要的模块来解决项目中遇到的特定问题。\n\n```groovy\nbuildscript {\n    ext.booster_version = '5.1.0'\n    repositories {\n        google()\n        mavenCentral()\n\n        // OPTIONAL If you want to use SNAPSHOT version, sonatype repository is required.\n        maven { url 'https://oss.sonatype.org/content/repositories/public' }\n    }\n    dependencies {\n        classpath \"com.didiglobal.booster:booster-gradle-plugin:$booster_version\" // ① \n        // ② figure out the features you really need, then choose the right module for integration\n        // ② 弄清楚真正需要的特性，然后从下面的模块列表中选择正确的模块进行集成\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n\n        // OPTIONAL If you want to use SNAPSHOT version, sonatype repository is required.\n        maven { url 'https://oss.sonatype.org/content/repositories/public' }\n    }\n}\n\napply plugin: 'com.android.application'\napply plugin: 'com.didiglobal.booster' // ③\n```\n\nThen using the following command in terminal to check if Booster enabled\n\n\u003e 然后在终端用如下命令来确认 Booster 是否启用：\n\n```bash\n./gradlew assembleDebug --dry-run\n```\n\nIf *transformClassesWithBoosterForDebug* can be found in the output, it means *Booster* is enabled. Congratulations! 🎉🎉🎉\n\n\u003e 如果在命令行输出中能搜到 *transformClassesWithBoosterForDebug* 说明 *Booster* 已经启用了，那么恭喜你！ 🎉🎉🎉\n\n\nThe `plugins` DSL also supported since Booster *3.0.0*\n\n\u003e *Booster* 从 *3.0.0* 开始支持 `plugins` *DSL* 的方式来启用\n\n```groovy\nplugins {\n    id 'com.didiglobal.booster' version '5.1.0'\n}\n```\n\n## Migrate from Booster 4.x to 5.x | 从 Booster 4.x 迁移到 5.x\n\nDue 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\n\n\u003e 由于 AGP 8 的不兼容性变更，AGP 7.x 及以下版本已经不再支持，如果你仍在使用 AGP 7.x，请使用 Booster 4.x\n\nMost `Task` based modules are no longer supported in Booster 5.0.0, however, the `Transform` based modules are still supported without breaking changes.\n\n\u003e 大部分基于 `Task` 的模块在 Booster 5.0.0 中已经不再支持，但是基于 `Transform` 的模块仍然支持且没有破坏性变更。\n\nAbout the details, please see [Migrate from Booster 4.x to 5.x](https://booster.johnsonlee.io/en/migration/)\n\n\u003e 详情请参见 [从 Booster 4.x 迁移到 5.x](https://booster.johnsonlee.io/zh/migration\n\n## Samples | 示例\n\n- [transformer-with-asm](https://github.com/boostersamples/transformer-with-asm)\n- [transformer-with-javassist](https://github.com/boostersamples/transformer-with-javassist)\n\n## Documentation | 文档\n\nAbout the details, please see [Booster Inside（深入理解 Booster）](https://booster.johnsonlee.io)\n\n## API Reference\n\nAbout the API reference, please see [Booster API Reference](https://reference.johnsonlee.io/booster/)\n\n## Contributing\n\nWelcome to contribute by creating issues or sending pull requests. See [Contributing Guideline](./CONTRIBUTING.md).\n\n\u003e 欢迎大家以 issue 或者 pull request 的形式为本项目作贡献。详见 [Contributing Guideline](./CONTRIBUTING.md)。\n\n## Community\n\n![Booster交流群](https://user-images.githubusercontent.com/2344882/84267118-271e7280-ab58-11ea-8c79-4feced83dd3f.png)\n\n## License\n\nBooster is licensed under the [Apache License 2.0](./LICENSE.txt).\n\n","funding_links":[],"categories":["Kotlin","Libraries","Articles","Development Alternatives"],"sub_categories":["Network Profiling Tools","Flutter"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fbooster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidi%2Fbooster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fbooster/lists"}