{"id":15034611,"url":"https://github.com/huolalatech/hll-wp-therouter-android","last_synced_at":"2026-01-06T11:05:42.049Z","repository":{"id":58685458,"uuid":"530172359","full_name":"HuolalaTech/hll-wp-therouter-android","owner":"HuolalaTech","description":"A framework for assisting in the renovation of Android componentization(帮助 App 进行组件化改造的动态路由框架)","archived":false,"fork":false,"pushed_at":"2025-05-09T03:32:06.000Z","size":1194,"stargazers_count":1209,"open_issues_count":3,"forks_count":144,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-09T03:38:45.100Z","etag":null,"topics":["android","componentization","dependency-injection","kotlin","modularization","navigation","router","therouter"],"latest_commit_sha":null,"homepage":"https://therouter.cn","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/HuolalaTech.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-29T10:36:06.000Z","updated_at":"2025-05-08T01:58:06.000Z","dependencies_parsed_at":"2024-02-04T09:28:17.948Z","dependency_job_id":"a91a6a1e-c2cc-4b9b-918e-80fc807d085e","html_url":"https://github.com/HuolalaTech/hll-wp-therouter-android","commit_stats":{"total_commits":268,"total_committers":8,"mean_commits":33.5,"dds":0.03358208955223885,"last_synced_commit":"c55d9c5ddcdf573ab0679bdc55d02549f3245313"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuolalaTech%2Fhll-wp-therouter-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuolalaTech%2Fhll-wp-therouter-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuolalaTech%2Fhll-wp-therouter-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuolalaTech%2Fhll-wp-therouter-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuolalaTech","download_url":"https://codeload.github.com/HuolalaTech/hll-wp-therouter-android/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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","componentization","dependency-injection","kotlin","modularization","navigation","router","therouter"],"created_at":"2024-09-24T20:25:41.558Z","updated_at":"2026-01-06T11:05:42.043Z","avatar_url":"https://github.com/HuolalaTech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"TheRouter: *Android componentization solution*\n---\n\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Language](https://img.shields.io/badge/Language-Kotlin-green)](https://kotlinlang.org/)\n[![Wiki](https://img.shields.io/badge/Wiki-open-green)](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki)  \n\nAndroid | [Harmony](https://github.com/HuolalaTech/hll-wp-therouter-harmony) | [iOS](https://github.com/HuolalaTech/hll-wp-therouter-ios) | [中文官网](https://therouter.cn)\n\n### A. Features\n\nTheRouter core functions have four functionalities:  \n\n* Page Navigation（[Navigator](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/Navigator)）\n* Cross-module dependency injection（[ServiceProvider](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/ServiceProvider)） \n* Single module automatic initialization （[FlowTaskExecutor](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/FlowTaskExecutor)） \n* Enable client apps to remotely load method dynamically ([ActionManager](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/ActionManager))\n\n* Demo:\n\n\u003cimg src=\"https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/uploads/image/demo.gif\" width=\"50%\" alt=\"demo gif\" /\u003e\n\n### B. Introduction\n\n**For more detailed documentation, please check the project wiki**：[Wiki](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki)  \n\n#### B1. Gradle configuration\n\n|module| apt                                                                                                      | router                                                                                                            | plugin                                                                                                            |\n|---|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n|version| [![apt](https://img.shields.io/badge/apt-1.3.0-green)](https://repo1.maven.org/maven2/cn/therouter/apt/) | [![router](https://img.shields.io/badge/router-1.3.0-green)](https://repo1.maven.org/maven2/cn/therouter/router/) | [![plugin](https://img.shields.io/badge/plugin-1.3.0-green)](https://repo1.maven.org/maven2/cn/therouter/plugin/) |\n\n```\n// root build.gradle \nclasspath 'cn.therouter:plugin:1.3.0'\n\n// app module \napply plugin: 'therouter'\n\n// dependencies\nkapt \"cn.therouter:apt:1.3.0\"\nimplementation \"cn.therouter:router:1.3.0\"\n```\n\n#### B2. initialization library\n\nThe library contains the automatic initialization function inside，link to: [Single module automatic initialization](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/FlowTaskExecutor); therefore, there's no need for any initialization code. However, it is recommended that you set the `Debug` environment according to your business settings to view log information.  \n\n```\n@Override\nprotected void attachBaseContext(Context base) {\n    TheRouter.setDebug(true or false);\n    super.attachBaseContext(base);\n}\n```\n\n#### B3. page parameter injection\n\nCalled in the `onCreate()` method of `Activity` or `Fragment`:   \n(*It is recommended to do it directly in `BaseActivity(BaseFragment)`*)\n\n```\n@Override\nprotected void onCreate(@Nullable Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    TheRouter.inject(this);\n}\n```\n\n#### B4. page navigation\n\nFor the meaning of the annotation `@Route`, please check the documentation: [Page Navigation](https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/Navigator)\n\n```\n@Route(path = \"http://therouter.com/home\", action = \"action://scheme.com\",\n        description = \"second page\", params = {\"hello\", \"world\"})\npublic class HomeActivity extends BaseActivity {\n    @Override\n    protected void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        TheRouter.build(\"Path\")\n            .withInt(\"intValue\", 12345678)\n            .withString(\"str_123_Value\", \"传中文字符串\")\n            .withBoolean(\"boolValue\", true)\n            .withLong(\"longValue\", 123456789012345L)\n            .withChar(\"charValue\", 'c')\n            .withDouble(\"double\", 3.14159265358972)\n            .withFloat(\"floatValue\", 3.14159265358972F)\n            .navigation();\n    }\n}\n```\n\n### C. proguard rules configuration  \n\n```\n# need add for Fragment page route\n# -keep public class * extends android.app.Fragment\n# -keep public class * extends androidx.fragment.app.Fragment\n# -keep public class * extends android.support.v4.app.Fragment\n\n-keep class androidx.annotation.Keep\n-keep @androidx.annotation.Keep class * {*;}\n-keepclassmembers class * {\n    @androidx.annotation.Keep *;\n}\n-keepclasseswithmembers class * {\n    @androidx.annotation.Keep \u003cmethods\u003e;\n}\n-keepclasseswithmembers class * {\n    @androidx.annotation.Keep \u003cfields\u003e;\n}\n-keepclasseswithmembers class * {\n    @androidx.annotation.Keep \u003cinit\u003e(...);\n}\n-keepclasseswithmembers class * {\n    @com.therouter.router.Autowired \u003cfields\u003e;\n}\n```\n\n### D. Build and Debug\n\n#### D1. project module description  \n\n```\nTheRouter\n  ├─app\n  │   └──sample\n  ├─business-a\n  │   └──modular business demo\n  ├─business-b\n  │   └──modular business demo\n  ├─business-base\n  │   └──modular business demo\n  │\n  ├─apt\n  │   └──Annotation processor tool code\n  │\n  ├─plugin\n  │   └──Gradle plugin\n  │\n  └─router\n      └──library code\n```\n\n#### D2. run Project \n\n1. Open `local.properties` and declare the modules you want to debug. For example, if you want the source code to debug the `apt` module, you can declare `apt=true`\n2.  sync Gradle change\n\n#### D3. plugin source code debugging\n\n`plugin` debugging is special; you'll need to modify the `module` name to enable plugin debugging.  \n\n1. Modify the `plugin` folder name to `buildSrc` (Case sensitive)\n2. Remove `classpath` reference in root `build.gradle`  \n3. sync Gradle change  \n\n\n### E. Change Log  \n\nlink to Releases：[Github Releases](https://github.com/HuolalaTech/hll-wp-therouter-android/releases)\n\n### F. Author \n\u003cimg src=\"https://github.com/HuolalaTech/hll-wp-therouter-android/wiki/uploads/image/hll.png\" width=\"40%\" alt=\"HUOLALA mobile technology team\" /\u003e\n\n### G. LICENSE\n\nTheRouter is licensed under the Apache License 2.0: [LICENSE](https://github.com/HuolalaTech/hll-wp-therouter-android/blob/main/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuolalatech%2Fhll-wp-therouter-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuolalatech%2Fhll-wp-therouter-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuolalatech%2Fhll-wp-therouter-android/lists"}