[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7365":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},7365,"compose-destinations","raamcosta\u002Fcompose-destinations","raamcosta","Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.","https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz",null,"Kotlin",3402,145,21,50,0,1,3,59.29,"Apache License 2.0",false,"main",[24,25,26,27,28,29,30,31,32,33],"android","android-library","hacktoberfest","jetpack-compose","kotlin","kotlin-android","kotlin-library","ksp","navigation","safeargs","2026-06-12 04:00:33","[![Maven metadata URL](https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=2.2&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\n[![License Apache 2.0](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fraamcosta\u002Fcompose-destinations.svg?style=for-the-badge&color=orange)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0)\n[![Android API](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fapi-21%2B-brightgreen.svg?style=for-the-badge)](https:\u002F\u002Fandroid-arsenal.com\u002Fapi?level=21)\n[![kotlin](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flanguages\u002Ftop\u002Fraamcosta\u002Fcompose-destinations.svg?style=for-the-badge&color=blueviolet)](https:\u002F\u002Fkotlinlang.org\u002F)\n\n\u003Cp align=\"center\">\n   \u003Cimg height=\"500\" src=\"\u002F.idea\u002Ficon.svg\"\u002F>  \n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\"> \n   \u003Ca href=\"https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\">Compose Destinations\u003C\u002Fa>\n\u003C\u002Fh1>\n\nA KSP library that processes annotations and generates code that uses Official Jetpack Compose Navigation under the hood. It hides the complex, non-type-safe and boilerplate code you would have to write otherwise. \u003C\u002Fbr>\nNo need to learn a whole new framework to navigate - most APIs are either the same as with the Jetpack Components or inspired by them.\n\n## V2 is here! 🙌\nPlease consider migrating to it and leaving feedback as GH issue or on our slack channel [#compose-destinations](https:\u002F\u002Fkotlinlang.slack.com\u002Farchives\u002FC06CS4UCQ10)!  \n * Migration guide: https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fmigrating-to-v2\n * V2 docs: https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fv2\n\n\n## Main features 🧭\n- Typesafe navigation arguments\n- Simple but configurable navigation graphs setup\n- Navigating back with a result in a simple and type-safe way\n- Getting the navigation arguments from the `SavedStateHandle` (useful in ViewModels) and `NavBackStackEntry` in a type-safe way.\n- Navigation animations\n- Destination wrappers to allow reusing Compose logic on multiple screens\n- Bottom sheet screens\n- Easy deep linking to screens\n- Wear OS support (since versions 1.x.30!)\n- All you can do with Official Jetpack Compose Navigation but in a simpler safer way!\n\nFor a deeper look into all the features, check our [documentation website](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz).\n\n## Basic Usage 🧑‍💻\n\n> [!NOTE]  \n> This readme is about v2. If you're now starting to use Compose Destinations, I strongly recommend using v2.\n> If you really want to see basic v1 usage, [check it here](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002F#basic-usage). \n\n### 1. Annotate your screen Composables with `@Destination\u003CRootGraph>`:\n\n```kotlin\n@Destination\u003CRootGraph> \u002F\u002F sets this as a destination of the \"root\" nav graph\n@Composable\nfun ProfileScreen() { \u002F*...*\u002F }\n```\n\n### 2. Add navigation arguments to the function declaration:\n\n```kotlin\n@Destination\u003CRootGraph>\n@Composable\nfun ProfileScreen(\n   id: Int, \u002F\u002F \u003C-- required navigation argument\n   groupName: String?, \u002F\u002F \u003C-- optional navigation argument\n   isOwnUser: Boolean = false \u002F\u002F \u003C-- optional navigation argument\n) { \u002F*...*\u002F }\n```\n\n`Parcelable`, `Serializable`, `Enum` and classes annotated with [`@kotlinx.serialization.Serializable`](https:\u002F\u002Fgithub.com\u002FKotlin\u002Fkotlinx.serialization) (as well as `Array`s and `ArrayList`s of these) work out of the box!\nYou can also make any other type a navigation argument type. Read about it [here](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fv2\u002Farguments\u002Fnavigation-arguments#custom-navigation-argument-types)\n\n> [!TIP]  \n> There is an alternative way to define the destination arguments in case you don't need to use them\ninside the Composable (as is likely the case when using ViewModel). Read more [here](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fv2\u002Farguments\u002Fnavigation-arguments#destination-navigation-arguments).\n\n### 3. Build the project\n   Or run ksp task (example: `.\u002Fgradlew kspDebugKotlin`), to generate all the Destinations. With the above annotated composable, a `ProfileScreenDestination` file would be generated (that we'll use in step 4).\n\n### 4. Use the generated `[ComposableName]Destination`'s invoke method to navigate to it.\n   It will have the correct typed arguments.\n\n```kotlin\n@Destination\u003CRootGraph>(start = true) \u002F\u002F sets this as the start destination of the \"root\" nav graph\n@Composable\nfun HomeScreen(\n   navigator: DestinationsNavigator\n) {\n   \u002F*...*\u002F\n   navigator.navigate(ProfileScreenDestination(id = 7, groupName = \"Kotlin programmers\"))\n}\n```\n\n### 5. Finally, add the NavHost call:\n\n```kotlin\nDestinationsNavHost(navGraph = NavGraphs.root)\n```\n> [!NOTE]  \n> `NavGraphs` is a generated file that contains all navigation graphs. \n> `root` here corresponds to the `\u003CRootGraph>` we used in the above examples.\n> You're also able to [define your own navigation graphs](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fv2\u002Fdefining-navgraphs) to use instead of `\u003CRootGraph>`.\n\nThis call adds all annotated Composable functions as destinations of the Navigation Host.\n\nThat's it! No need to worry about routes, `NavType`, bundles and strings. All that redundant and\nerror-prone code gets generated for you.\n\n## Setup 🧩\n\nCompose destinations is available via maven central.\n\n#### 1. Add the KSP plugin:\n\n> **Note**: The version you chose for the KSP plugin depends on the Kotlin version your project uses. \u003C\u002Fbr>\nYou can check https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fksp\u002Freleases for the list of KSP versions, then pick the last release that matches your Kotlin version.\nExample:\nIf you're using `1.9.22` Kotlin version, then the last KSP version is `1.9.22-1.0.17`.\n\n\u003Cdetails open>\n  \u003Csummary>groovy - build.gradle(:module-name)\u003C\u002Fsummary>\n\n```gradle\nplugins {\n    \u002F\u002F...\n    id 'com.google.devtools.ksp' version '1.9.22-1.0.17' \u002F\u002F Depends on your kotlin version\n}\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>kotlin - build.gradle.kts(:module-name)\u003C\u002Fsummary>  \n\n```gradle\nplugins {\n    \u002F\u002F...\n    id(\"com.google.devtools.ksp\") version \"1.9.22-1.0.17\" \u002F\u002F Depends on your kotlin version\n}\n```\n\u003C\u002Fdetails>\n\n#### 2. Add the dependencies:\n\nCompose Destinations has multiple active versions. \nThe higher one uses the latest versions for Compose and Navigation, while the others use only stable versions.\nChoose the one that matches your Compose version, considering this table:\n\n\u003Ctable>\n \u003Ctr>\n  \u003Ctd>Compose 1.1 (1.1.x)\u003C\u002Ftd>\u003Ctd>\u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.5&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.2 (1.2.x)\u003C\u002Ftd>\u003Ctd>\u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.6&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.3 (1.3.x)\u003C\u002Ftd>\u003Ctd>\u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.7&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.4 (1.4.x)\u003C\u002Ftd>\u003Ctd>\u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.8&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.5 (1.5.x)\u003C\u002Ftd>\u003Ctd>\u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.9&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.6 (1.6.x)\u003C\u002Ftd>\n    \u003Ctd>\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.10&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n        OR\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=2.0&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n    \u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.7 (1.7.x)\u003C\u002Ftd>\n    \u003Ctd>\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=1.11&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n        OR\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=2.1&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n    \u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.8 (1.8.x)\u003C\u002Ftd>\n    \u003Ctd>\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=2.2&color=blue&metadataUrl=https:\u002F\u002Fs01.oss.sonatype.org\u002Fservice\u002Flocal\u002Frepo_groups\u002Fpublic\u002Fcontent\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fmaven-badges.herokuapp.com\u002Fmaven-central\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n    \u003C\u002Ftd>\n \u003C\u002Ftr>\n \u003Ctr>\n  \u003Ctd>Compose 1.9 (1.9.x)\u003C\u002Ftd>\n    \u003Ctd>\n        \u003Cimg alt=\"Maven Central\" src=\"https:\u002F\u002Fimg.shields.io\u002Fmaven-metadata\u002Fv?versionPrefix=2.3&color=blue&metadataUrl=https:\u002F\u002Frepo1.maven.org\u002Fmaven2\u002Fio\u002Fgithub\u002Fraamcosta\u002Fcompose-destinations\u002Fcore\u002Fmaven-metadata.xml&style=for-the-badge)](https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fio.github.raamcosta.compose-destinations\u002Fcore)\">\n    \u003C\u002Ftd>\n \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n> [!WARNING]  \n> If you choose a version that uses a higher version of Compose than the one you're setting for your app, gradle will upgrade your Compose version via transitive dependency.\n\n\u003Cdetails open>\n  \u003Csummary>groovy - build.gradle(:module-name)\u003C\u002Fsummary>\n\n```gradle\nimplementation 'io.github.raamcosta.compose-destinations:core:\u003Cversion>'\nksp 'io.github.raamcosta.compose-destinations:ksp:\u003Cversion>'\n\n\u002F\u002F V2 only: for bottom sheet destination support, also add\nimplementation 'io.github.raamcosta.compose-destinations:bottom-sheet:\u003Cversion>'\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n  \u003Csummary>kotlin - build.gradle.kts(:module-name)\u003C\u002Fsummary>  \n\n```gradle\nimplementation(\"io.github.raamcosta.compose-destinations:core:\u003Cversion>\")\nksp(\"io.github.raamcosta.compose-destinations:ksp:\u003Cversion>\")\n\n\u002F\u002F V2 only: for bottom sheet destination support, also add\nimplementation(\"io.github.raamcosta.compose-destinations:bottom-sheet:\u003Cversion>\")\n```\n\u003C\u002Fdetails>\n\n> [!NOTE]  \n> If you want to use Compose Destinations in a **Wear OS** app, replace above core dependency with: \u003C\u002Fbr>\n`implementation 'io.github.raamcosta.compose-destinations:wear-core:\u003Cversion>'` \u003C\u002Fbr>\n> this will use [Wear Compose Navigation](https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fwearables\u002Fcompose\u002Fnavigation) internally. \u003C\u002Fbr>\n> Read more about the next steps to configure these features [here](https:\u002F\u002Fcomposedestinations.rafaelcosta.xyz\u002Fwear-os)\n\n# ⚠️ WARNING - `1.11.3-alpha` \u002F `2.1.0-beta02` and above (Compose 1.7)\nOR if you got this error `kotlinx.serialization.SerializationException: Serializer for class 'DirectionImpl' is not found.`\n\n\n## - **DO NOT call `NavController.navigate` function** anywhere\nWith the introduction of type safe APIs on the official library, our `NavController` extension functions that received `Direction` are now shadowed by new member functions on `NavController`.  \nThis means that the official member function would be called instead of our extension functions, and so we removed those extension functions.  \nInstead, always make sure to use `DestinationsNavigator`. You can get one of such navigators by:\n\n- If inside a specific screen:\n   - Simply receive a `DestinationsNavigator` instead of `NavController` in your annotated screens.\n- If navigating on top level (such as around `DestinationsNavHost`, bottom nav bar, etc)\n   - `navController.rememberDestinationsNavigator()` if in a Composable\n   - `navController.toDestinationsNavigator()` if not in a Composable\n\nRead more about these changes [here](https:\u002F\u002Fgithub.com\u002Fraamcosta\u002Fcompose-destinations\u002Freleases\u002Ftag\u002F2.1.0-beta02).\n\n## - **DO NOT depend on jetpack compose navigation directly**\nCompose Destinations provides the correct version transitively.  \nSo, if you have dependency on `androidx.navigation:navigation-compose`, please remove it! This has always been true, but more important now.\n\n## Community 💬\n\nPlease join the community at Kotlin slack channel: [#compose-destinations](https:\u002F\u002Fkotlinlang.slack.com\u002Farchives\u002FC06CS4UCQ10)  \nAsk questions, suggest improvements, or anything else related to the library.\n\n\n**If you like the library, consider starring and sharing it with your colleagues.**\n","Compose Destinations 是一个注解处理库，旨在为 Jetpack Compose 导航提供类型安全的支持，并且无需编写样板代码。该项目的核心功能包括类型安全的导航参数、简单但可配置的导航图设置、以及以类型安全的方式从 `SavedStateHandle` 和 `NavBackStackEntry` 获取导航参数等。此外，它还支持导航动画、目的地包装器、底部弹出屏幕、深度链接等功能，并且兼容 Wear OS 设备。该库特别适合于需要在 Android 应用中使用 Jetpack Compose 进行复杂页面导航的场景，能够显著简化开发过程同时增强代码的安全性和可维护性。",2,"2026-06-11 03:11:57","top_language"]