Skip to main content
Version: 2.x

Setup

Compose destinations is available via maven central.

1. Add the KSP plugin

plugins {
//...
id 'com.google.devtools.ksp' version '1.9.22-1.0.17' // Depends on your kotlin version
}
info

The version you chose for the KSP plugin depends on the Kotlin version your project uses.
You can check https://github.com/google/ksp/releases for the list of KSP versions, then pick the last release that matches your Kotlin version. Example: If you're using 1.9.22 Kotlin version, then the last KSP version is 1.9.22-1.0.17.

2. Add the dependencies

Compose Destinations has multiple active versions. The higher one uses the latest versions for Compose and Navigation, while the others use only stable versions. Choose the one that matches your Compose version, considering this table:

Compose 1.6 (1.6.x)Maven Central
Compose 1.7 (1.7.x)Maven Central
caution

If you choose a version that uses Compose with a higher version than the one you're setting for your app, gradle will upgrade your Compose version via transitive dependency.

implementation 'io.github.raamcosta.compose-destinations:core:<version>'
ksp 'io.github.raamcosta.compose-destinations:ksp:<version>'

// for bottom sheet destination support, also add
implementation 'io.github.raamcosta.compose-destinations:bottom-sheet:<version>'
info

If you want to use Compose Destinations in a Wear OS app, replace above core dependency with: implementation 'io.github.raamcosta.compose-destinations:wear-core:<version>'
this will use Wear Compose Navigation internally.