{"id":28729793,"url":"https://github.com/didi/drouter","last_synced_at":"2025-06-15T17:11:03.496Z","repository":{"id":37329426,"uuid":"316115656","full_name":"didi/DRouter","owner":"didi","description":"Android Router Framework","archived":false,"fork":false,"pushed_at":"2023-12-20T12:45:54.000Z","size":5971,"stargazers_count":744,"open_issues_count":11,"forks_count":93,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-30T09:57:11.873Z","etag":null,"topics":["android","router"],"latest_commit_sha":null,"homepage":"","language":"Java","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-11-26T03:41:48.000Z","updated_at":"2024-10-15T10:15:15.000Z","dependencies_parsed_at":"2023-12-20T14:27:09.337Z","dependency_job_id":"83fb94dc-36ee-4582-acca-a232a8d1a7ae","html_url":"https://github.com/didi/DRouter","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/didi/DRouter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FDRouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FDRouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FDRouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FDRouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didi","download_url":"https://codeload.github.com/didi/DRouter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FDRouter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260016055,"owners_count":22946321,"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","router"],"created_at":"2025-06-15T17:11:02.664Z","updated_at":"2025-06-15T17:11:03.490Z","avatar_url":"https://github.com/didi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 简介\n\n\u003cdiv align=\"center\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/license-Apache2.0-brightgreen.svg\" align=left /\u003e\n \u003cimg src=\"https://img.shields.io/badge/drouter--plugin--proxy-1.0.2-red.svg\" align=left /\u003e\n \u003cimg src=\"https://img.shields.io/badge/drouter--api-2.4.6-blue.svg\" align=left /\u003e\n \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" align=left /\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\nDRouter是18年滴滴乘客端自研的一套Android路由框架，基于平台化解耦的思想，为组件间通信服务。该项目以功能全面、易用为原则，支持各种路由场景，在页面路由、服务获取和过滤、跨进程及应用、VirtualApk插件支持等方面都能提供多样化的服务。目前已在滴滴乘客端、顺风车、单车、国际化、滴滴定制车等十多个滴滴的app内使用，得到各种场景的验证。\n\n\u003cimg src=\"https://czp.s3.didiyunapi.com/image/drouter/DRouter_Architecture.jpg\" width=\"700px\" align=\"center\" alt=\"DRouter架构图\"/\u003e\n\n## 提供功能\n\n- 使用URI字符串导航Activity、Fragment、View、RouterHandler，注解支持正则表达式、占位符\n- 适配ActivityResultLauncher\n- RouterHandler、Activity支持等待异步完成(hold)，并可设置超时时间\n- RouterHandler指定执行线程\n- 注入拦截器，支持全局拦截器和局部拦截器，面向切面编程，拦截器可以使用字符串名字\n- 更为多样化的Fragment页面跳转能力\n- 使用接口或基类导航到实现类Service的Class以及实例\n- 支持Service别名以及多维过滤器查找\n- 导航Service可指定任意构造器、支持单例\n- 支持动态注册RouterHandler、Service，绑定生命周期自动解绑\n- 简单易用的跨进程执行RouterHandler、Service\n- 跨进程访问无需提前绑定、如同本地调用一样进行访问\n- 支持客户端进程和服务端进程自动重连\n- 共享内存\n- 支持VirtualApk\n- 适配AndroidX\n\n### 技术特点\n1. 支持增量编译，多线程扫描，提升编译效率\n2. 初始化点对点加载路由表，无反射和遍历，异步加载，提升启动性能\n3. 完整的Router功能\n4. 强大的ServiceLoader实例化和过滤能力\n5. 易用高效的跨进程通信机制，同步执行，就像调用本地方法\n6. 框架内部尽可能规避反射，提升运行时性能\n7. 动态下载与api匹配的plugin，无需升级plugin版本\n8. 无需手动添加混淆规则\n\n## 核心模块\n\n模块 | 功能\n|  :-- | :--  |\nRouter | Native和H5导航Activity、Fragment、View、RouterHandler，支持切入拦截器\nService | 基于spi通过接口的形式查找到实现类，支持过滤和优先级配置\nPage | 支持单Page、栈Page、ViewPager三种形式的Fragment加载\nProcess | 跨进程访问Router、Service，共享内存\n\n## 使用文档\n\n接入方式及文档请移步 [Wiki](https://github.com/didi/DRouter/wiki)\n\n``` java\n/** 插件 **/\nclasspath \"io.github.didi:drouter-plugin:1.3.5\"      // agp 1.x - 7.x\nclasspath \"io.github.didi:drouter-plugin:1.4.0\"      // agp 8.x以上\n\n/** 依赖库 **/\napi \"io.github.didi:drouter-api:2.4.6\"           // Router、Service\napi \"io.github.didi:drouter-api-page:1.0.0\"      // Page\napi \"io.github.didi:drouter-api-process:1.0.0\"   // Process\n```\n\n## 微信交流群\n\n[微信群二维码链接](http://p-bim-img.bytedance.net/tos-cn-i-hf6qmptvc7/drouter/drouter.png~tplv-hf6qmptvc7-image.image)\n\n或微信搜索作者 gwball (备注DRouter)入群\n\n## 相关文章\n\n[滴滴开源DRouter：一款高效的Android路由框架](https://juejin.cn/post/6975818153381068831)\n\n## License\n\n\u003cimg alt=\"Apache-2.0 license\" src=\"https://www.apache.org/img/ASF20thAnniversary.jpg\" width=\"128\"\u003e\n\nDRouter 基于 Apache-2.0 协议进行分发和使用，更多信息参见 [协议文件](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fdrouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidi%2Fdrouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fdrouter/lists"}