You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: remove redundant test configuration blocks from build scripts to streamline setup
* chore: update build script for maven publishing and license year
* chore: update dependencies and build configuration for compatibility and publishing
* docs: update README
**Wisp**는 Jetpack Compose를 위한 타입 세이프(type-safe), 서버 주도(server-driven) 딥링크 라이브러리입니다. 단일 표준 URI를 기반으로 내비게이션 백스택을 동적으로 구성할 수 있게 하여, 표준 `navigation-compose` 라이브러리의 정적 백스택 한계를 극복합니다.
-**싱글 액티비티 아키텍처 (Single-Activity Architecture):** Wisp는 **싱글 액티비티 구조** 전용으로 설계되었으며, 여러 Activity 간의 내비게이션은 지원하지 않습니다. 이는 Jetpack Compose에 권장되는 최신 안드로이드 개발 방식과 일치합니다.
18
-
-**Jetpack Navigation 및 타입 안정성:** 이 라이브러리는 Jetpack Navigation Compose의 확장 기능이며, **타입 세이프(type-safe) 내비게이션** 패러다임 전용으로 설계되었습니다. `NavController`가 반드시 필요하며, 전통적인 문자열 기반의 라우트는 지원하지 않습니다.
19
-
-**멀티 모듈 지원 (Multi-Module Support):** Wisp는 멀티 모듈 프로젝트를 완벽하게 지원합니다. `ServiceLoader` 패턴을 사용하여, 라이브러리가 포함된 모든 모듈로부터 `@Wisp` 라우트 정의를 자동으로 탐지합니다.
28
+
-**싱글 액티비티 아키텍처:** Wisp는 **싱글 액티비티 구조(Single-Activity Architecture)**를 위해 설계되었으며, 여러 Activity 간의 내비게이션은 지원하지 않습니다. 이는 Jetpack Compose에 권장되는 최신 안드로이드 개발 방식과 일치합니다.
29
+
-**Jetpack Navigation 및 타입 안정성:** 이 라이브러리는 Jetpack Navigation Compose의 **타입 세이프(type-safe) 내비게이션** 패러다임 전용으로 설계되었습니다. `NavController`가 반드시 필요하며, 전통적인 문자열 기반의 라우트는 지원하지 않습니다.
30
+
-**멀티 모듈 지원:** Wisp는 멀티 모듈 프로젝트를 완벽하게 지원합니다. `ServiceLoader` 패턴을 사용하여, 라이브러리가 포함된 모든 모듈로부터 `@Wisp` 라우트 정의를 자동으로 탐지합니다.
**Wisp** is a type-safe, server-driven deep link library for Jetpack Compose. It allows you to dynamically build your navigation backstack from a single, standard URI, overcoming the static backstack limitations of the `navigation-compose` library.
translation: [Read in Korean (한국어)](./README.ko.md)
8
9
10
+
<br>
11
+
12
+
<palign="center">
13
+
<strong>Wisp</strong> is a type-safe, server-driven deep link library for Jetpack Compose.<br>
14
+
It allows you to dynamically build your navigation backstack from a single, standard URI,<br>
15
+
overcoming the static backstack limitations of the <code>navigation-compose</code> library.
16
+
</p>
17
+
18
+
<br>
19
+
9
20
## 🤔 Why Wisp?
10
21
11
22
Standard deep links in Jetpack Compose often lead to predefined, static backstacks. It's challenging to implement scenarios where a server needs to dictate a dynamic user journey on the fly (e.g., `Product Screen -> Coupon Screen -> Checkout Screen`).
@@ -14,17 +25,64 @@ Wisp automates this process by building the entire backstack from the URI's path
14
25
15
26
## 🏛️ Architecture & Prerequisites
16
27
17
-
-**Single-Activity Architecture:** Wisp is designed for a **Single-Activity Architecture** and does not support navigating between different Activities. This aligns with the modern Android development practices recommended for Jetpack Compose.
18
-
-**Jetpack Navigation & Type-Safety:** The library is an extension of Jetpack Navigation Compose and is exclusively designed for its **type-safe navigation** paradigm. It requires a `NavController` and does not support traditional string-based routes.
19
-
-**Multi-Module Support:** Wisp fully supports multi-module projects. It automatically discovers `@Wisp` route definitions from all modules that include the library, using a `ServiceLoader` pattern.
28
+
-**Single-Activity Architecture:** Wisp is designed for a **Single-Activity Architecture** and does not support navigating between different Activities.
29
+
-**Jetpack Navigation & Type-Safety:** The library is exclusively designed for the **type-safe navigation** paradigm of Jetpack Navigation Compose. It requires a `NavController` and does not support traditional string-based routes.
30
+
-**Multi-Module Support:** Wisp fully supports multi-module projects using a `ServiceLoader` pattern.
31
+
-**Minimum Requirements:**
32
+
-**minSdk:** 21 (Android 5.0)
33
+
-**Kotlin:** 1.9.0 or higher (Compatible with KSP)
**Note:** Wisp is not yet published to Maven Central. To use it, you currently need to clone this repository and include the modules in your project locally.
39
+
### Version Catalog
40
+
41
+
If you're using Version Catalog, you can configure the dependency by adding it to your `libs.versions.toml` file as follows:
Add the KSP plugin to your project-level `build.gradle.kts`. **Make sure to use a KSP version that matches your Kotlin version.** (Check [KSP Releases](https://github.com/google/ksp/releases))
57
+
58
+
```kotlin
59
+
plugins {
60
+
id("com.google.devtools.ksp") version "YOUR_KSP_VERSION" apply false
61
+
}
62
+
```
63
+
64
+
Then, add the dependencies to your **module**'s `build.gradle.kts` file:
Designate a deep link destination by adding the `@Wisp` annotation to any `@Serializable``data class` or `object`. The string passed to `@Wisp` is the path segment that will be used in the deep link URI.
85
+
Designate a deep link destination by adding the `@Wisp` annotation to any `@Serializable``data class` or `object`.
28
86
29
87
Route properties are automatically populated from the URI's **query parameters**. If a property has a **default value**, it is considered optional.
30
88
@@ -43,7 +101,7 @@ data class ProductDetail(
43
101
44
102
### 2. Configure the Manifest
45
103
46
-
For deep links to be accessible from outside your app, you must register an `<intent-filter>` in your `AndroidManifest.xml`. Both `scheme` and `host` are required.
104
+
Register an `<intent-filter>` in your `AndroidManifest.xml`. Both `scheme` and `host` are required.
47
105
48
106
```xml
49
107
<!-- In AndroidManifest.xml -->
@@ -92,22 +150,6 @@ val uri = "app://wisp/product/user?productId=123&userId=99".toUri()
92
150
navController.navigateTo(uri)
93
151
```
94
152
95
-
## 🧪 Testing
96
-
97
-
### Running the Sample App
98
-
99
-
1. Clone this repository and open it in Android Studio.
100
-
2. Select the `app` run configuration and run it on an emulator or a physical device.
101
-
3. Use the buttons in the app to test navigation.
102
-
103
-
### Testing with ADB
104
-
105
-
You can test your deep links directly from the command line using `adb`. This is a great way to simulate a link click from an external source.
106
-
107
-
```bash
108
-
adb shell am start -a android.intent.action.VIEW -d "app://wisp/product/user?productId=123&userId=99"
0 commit comments