Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 1cd6945

Browse files
committed
Merge branch 'main' of github.com:app-outlet/karavel into main
2 parents 71c1d6e + 3fd63bd commit 1cd6945

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

README.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# ⛵️Karavel
22
[![Maintainability](https://api.codeclimate.com/v1/badges/ea792fdab9ab8344cb1c/maintainability)](https://codeclimate.com/github/app-outlet/karavel/maintainability)
33

4-
Lightweight navigation library for Compose for Desktop
4+
Karavel is a very simple and lightweight navigation library for Compose for Desktop. It creates a stack of composables and let you navigate poping and pushing on this stack.
55

6-
## Install
7-
8-
1. Add it in your root build.gradle at the end of repositories:
9-
```kotlin
10-
repositories {
11-
// ...
12-
mavenCentral()
13-
}
14-
```
15-
16-
2. Add the dependency
6+
## Install
7+
Add the dependency on you `build.gradle.kts` file
178
```kotlin
189
dependencies {
1910
// ...
@@ -38,19 +29,16 @@ class MainPage : Page() {
3829
```
3930

4031
```kotlin
41-
import androidx.compose.desktop.Window
42-
import androidx.compose.material.MaterialTheme
43-
import io.appoutlet.karavel.Karavel
44-
import io.appoutlet.ui.page.MainPage
32+
fun main() = application {
33+
Window(onCloseRequest = ::exitApplication) {
4534

46-
fun main() = Window {
35+
// 3. Create karavel instance passing the main page as argument
36+
val karavel = Karavel(MainPage())
4737

48-
// 3. Create karavel instance passing the main page as argument
49-
val karavel = Karavel(MainPage())
50-
51-
MaterialTheme {
52-
// 4. Get the current page content
53-
karavel.currentPage().content()
38+
MaterialTheme {
39+
// 4. Get the current page content
40+
karavel.currentPage().content()
41+
}
5442
}
5543
}
5644
```

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import org.jetbrains.compose.compose
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

44
plugins {
5-
kotlin("jvm") version "1.4.30"
6-
id("org.jetbrains.compose") version "0.3.0-build152"
5+
kotlin("jvm") version "1.6.10"
6+
id("org.jetbrains.compose") version "1.1.1"
77
`java-library`
88
`maven-publish`
99
jacoco
@@ -96,7 +96,7 @@ repositories {
9696

9797
dependencies {
9898
testImplementation(kotlin("test-junit5"))
99-
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
100-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0")
99+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
100+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
101101
implementation(compose.desktop.currentOs)
102102
}

0 commit comments

Comments
 (0)