{"id":17688714,"url":"https://github.com/boybeak/routerfit","last_synced_at":"2025-09-07T14:39:59.138Z","repository":{"id":87642807,"uuid":"342385079","full_name":"boybeak/Routerfit","owner":"boybeak","description":"A Router library","archived":false,"fork":false,"pushed_at":"2021-03-04T06:57:22.000Z","size":224,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T22:48:04.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boybeak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-02-25T21:34:17.000Z","updated_at":"2021-03-08T07:13:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"10b5e31f-def0-4827-8ece-155d830b033e","html_url":"https://github.com/boybeak/Routerfit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boybeak/Routerfit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boybeak%2FRouterfit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boybeak%2FRouterfit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boybeak%2FRouterfit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boybeak%2FRouterfit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boybeak","download_url":"https://codeload.github.com/boybeak/Routerfit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boybeak%2FRouterfit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267912106,"owners_count":24164498,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-24T11:45:12.750Z","updated_at":"2025-07-30T17:40:07.217Z","avatar_url":"https://github.com/boybeak.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IRouter ![Version](https://img.shields.io/badge/version-0.06-blue)\nA new router. [Source code ananylize](https://boybeak.github.io/%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%E7%B3%BB%E5%88%97/%E6%89%8B%E6%92%B8%E4%B8%80%E4%B8%AA%E8%B7%AF%E7%94%B1%E6%A1%86%E6%9E%B6IRouter.html).\n\n# Install\n\n```groovy\n// project's build.gradle\nbuildscript {\n    ext {\n        i_router_version = '0.0.4'\n    }\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath \"com.github.boybeak:i-router-register:$i_router_version\"\n    }\n}\n```\n\n```groovy\n// application's build.gradle\nplugins {\n  id 'kotlin-kapt'\n  id 'i-router-register'\n}\n\nandroid {\n  defaultConfig {\n    javaCompileOptions {\n            annotationProcessorOptions {\n                arguments = [ROUTER_MODULE_NAME : project.getName()]\n            }\n        }\n  }\n}\n\ndependencies {\n  implementation 'androidx.fragment:fragment:1.2.5'\n  implementation \"com.github.boybeak:i-router:$i_router_version\"\n  kapt \"com.github.boybeak:i-router-compiler:$i_router_version\"\n}\n```\n\n```groovy\n// other module's build.gradle\nplugins {\n  id 'kotlin-kapt'\n}\n\nandroid {\n  defaultConfig {\n    javaCompileOptions {\n            annotationProcessorOptions {\n                arguments = [ROUTER_MODULE_NAME : project.getName()]\n            }\n        }\n  }\n}\n\ndependencies {\n  implementation 'androidx.fragment:fragment:1.2.5'\n  implementation \"com.github.boybeak:i-router:$i_router_version\"\n  kapt \"com.github.boybeak:i-router-compiler:$i_router_version\"\n}\n```\n\n\n\n# Usage\n\nLike **ARouter**, you must add  a **@RoutePath** annotation for the target activity.\n\n```kotlin\n@RoutePath(\"topic/detail\")\nclass TopicActivity : AppCompatActivity() {\n\n    @Inject(\"topic\")\n    private var topic: Topic? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_topic)\n\n        IRouter.inject(this, intent)\n\n        findViewById\u003cAppCompatTextView\u003e(R.id.titleTV).text = topic!!.content\n\n    }\n}\n```\n\nThe values passed by intent, can be set a value by **@Inject** and `IRouter.inject(this, intent)`.\n\n\n\nLike **Retrofit**, you must create an interface to declare \"api\".\n\n```kotlin\ninterface IRouterService {\n    @RouteTo(\"topic/detail\")\n    fun topicDetail(@Key(\"topic\") topic: Topic): Navigator\n}\n```\n\nThen, create a global `IRouterService` instance.\n\n```kotlin\nval iRouter = IRouter.Builder()\n    .isDebug(BuildConfig.DEBUG)\n    .errorActivity(ErrorActivity::class.java)\n    .build()\n    .create(IRouterService::class.java)\n```\n\nFinally, use the `iRouter`.\n\n```kotlin\niRouter.topicDetail(topic).startActivity(this@MainActivity)\n\n// OR\n\niRouter.topicDetail(topic).startActivityForResult(this, 100) { requestCode, resultCode, data -\u003e\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboybeak%2Frouterfit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboybeak%2Frouterfit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboybeak%2Frouterfit/lists"}