{"id":19734116,"url":"https://github.com/devmike01/chaicup","last_synced_at":"2025-08-01T23:40:21.762Z","repository":{"id":181734875,"uuid":"666056580","full_name":"devmike01/Chaicup","owner":"devmike01","description":"Generates routes for jetpack compose","archived":false,"fork":false,"pushed_at":"2023-12-17T23:47:10.000Z","size":172,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T18:24:28.549Z","etag":null,"topics":["android-app","android-library","jetpack-compose","jetpack-navigation"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/devmike01.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":"2023-07-13T15:52:33.000Z","updated_at":"2023-08-18T21:56:54.000Z","dependencies_parsed_at":"2023-12-18T00:52:43.054Z","dependency_job_id":null,"html_url":"https://github.com/devmike01/Chaicup","commit_stats":null,"previous_names":["devmike01/chaicup"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmike01%2FChaicup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmike01%2FChaicup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmike01%2FChaicup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmike01%2FChaicup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devmike01","download_url":"https://codeload.github.com/devmike01/Chaicup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241059037,"owners_count":19902301,"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-app","android-library","jetpack-compose","jetpack-navigation"],"created_at":"2024-11-12T00:35:35.531Z","updated_at":"2025-02-27T20:53:42.443Z","avatar_url":"https://github.com/devmike01.png","language":"Kotlin","readme":"# Chaicup\n\n\n### How to use\n\nChaicup is a lightweight kotlin library that \"automagically\" generates routes based on your `composable` function's name or custom name.\n\n##### Step 1\n```groovy\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\n\n##### Step 2\nAdd this to your app level in `build.gradle`\n```groovy\nplugins {\n    ...\n    id(\"com.google.devtools.ksp\")\n}\n```\n\n\n##### Step 3\nAdd these dependencies to your project\n```kotlin\nimplementation(\"com.github.devmike01.Chaicup:annotations:1.3.0\")\nksp(\"com.github.devmike01.Chaicup:compiler:1.3.0\")\n```\n\n##### Step 4\nAdd this to your app level gradle file\n```kotlin\n kotlin.sourceSets.main {\n        kotlin.srcDirs(\n                file(\"$buildDir/generated/ksp/{BUILD_TYPE}/kotlin/io/devmike01\"),\n        )\n    }\n```\nThe `BUILD_TYPE` is your app build type. In typical case, it should be `release`, `debug` or any other build types.\n\n### Implementation\n- Add `@ChaiRoute` to your compose function.\n- Build your project and the routes would be automagically generated for you\n- All the routes are located inside `ChaiCupRoutes`\n- If you add `@ChaiRoute` to your function called `BuildScreen()`, it would generate a route named `BUILDSCREEN`.\n\n### Sample\n```kotlin\n@Composable\n@ChaiRoute\nfun Greeting(navController: NavController, name: String) {\n  ...\n}\n\n\n@Composable\n@ChaiRoute\nfun Greeting02(name: String) {\n    ...\n}\n\n```\nIt generates code snippet\n```kotlin\nobject ChaiCupRoutes{\n    const val GREETING_ROUTE = \"/io.devmike01.chaicup.Greeting\"\n    const val GREETING02_ROUTE = \"/io.devmike01.chaicup.Greeting02\"\n}\n```\n\nTo see the generated codes, look at this directory: `../generated/ksp/release/` or `../generated/ksp/debug/`\n\n### Milestone\n- [ ] Add support for arguments in path\n- [x] Use underscores to string together routes\n- [x] Generate new routes from compose function\n\nLicense\n-------\n```text\nCopyright 2023 Oladipupo Gbenga\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmike01%2Fchaicup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmike01%2Fchaicup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmike01%2Fchaicup/lists"}