Skip to content

Commit 2f8ffd6

Browse files
committed
Merge branch 'main' into feature/radial-placement
2 parents f97fcc8 + 9d2b239 commit 2f8ffd6

7 files changed

Lines changed: 70 additions & 39 deletions

File tree

‎.github/workflows/deploy-docs.yml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy API Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'library/src/**'
8+
- 'library/build.gradle.kts'
9+
- 'gradle/libs.versions.toml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: true
20+
21+
jobs:
22+
deploy:
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-java@v4
31+
with:
32+
distribution: zulu
33+
java-version: 17
34+
35+
- uses: gradle/actions/setup-gradle@v4
36+
37+
- name: Build wasmJs sample
38+
run: ./gradlew :sample:wasmJsBrowserDistribution
39+
40+
- name: Generate API docs
41+
run: ./gradlew :library:dokkaGeneratePublicationHtml
42+
43+
- name: Assemble site
44+
run: |
45+
mkdir -p _site
46+
cp -r sample/build/dist/wasmJs/productionExecutable/* _site/
47+
cp -r library/build/dokka/html _site/api
48+
49+
- uses: actions/configure-pages@v5
50+
51+
- uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: _site
54+
55+
- id: deployment
56+
uses: actions/deploy-pages@v4

‎.github/workflows/deploy-web.yml‎

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,12 @@
1-
name: Deploy Web Sample
1+
# Superseded by deploy-docs.yml which deploys both the sample and API docs.
2+
# Kept as a placeholder to avoid breaking existing workflow references.
3+
name: Deploy Web Sample (deprecated)
24

35
on:
4-
push:
5-
branches: [ main ]
66
workflow_dispatch:
77

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
13-
concurrency:
14-
group: pages
15-
cancel-in-progress: true
16-
178
jobs:
18-
deploy:
9+
redirect:
1910
runs-on: ubuntu-latest
20-
environment:
21-
name: github-pages
22-
url: ${{ steps.deployment.outputs.page_url }}
2311
steps:
24-
- uses: actions/checkout@v4
25-
26-
- uses: actions/setup-java@v4
27-
with:
28-
distribution: zulu
29-
java-version: 17
30-
31-
- uses: gradle/actions/setup-gradle@v4
32-
33-
- name: Build wasmJs distribution
34-
run: ./gradlew :sample:wasmJsBrowserDistribution
35-
36-
- uses: actions/configure-pages@v5
37-
38-
- uses: actions/upload-pages-artifact@v3
39-
with:
40-
path: sample/build/dist/wasmJs/productionExecutable
41-
42-
- id: deployment
43-
uses: actions/deploy-pages@v4
12+
- run: echo "Use deploy-docs.yml instead"

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[![Maven Central](https://img.shields.io/maven-central/v/io.github.linde9821/treelayout-kmp)](https://central.sonatype.com/artifact/io.github.linde9821/treelayout-kmp)
66

7+
**[Live Demo](https://linde9821.github.io/TreeLayoutKMP/)** · **[API Docs](https://linde9821.github.io/TreeLayoutKMP/api/)**
8+
79
> ⚠️ **This library is under active development and has not reached a stable release yet.**
810
> The API may change between versions. Feedback and contributions are welcome.
911
@@ -19,8 +21,6 @@ your nodes; the library computes optimal (x, y) coordinates for every node in th
1921
> **Note:** This library is a *layout engine*, not a rendering library. It outputs coordinates — how you draw the tree
2022
> (Canvas, SVG, Compose, HTML, etc.) is entirely up to you.
2123
22-
**[Try the live demo on GitHub Pages](https://linde9821.github.io/TreeLayoutKMP/)**
23-
2424
## Supported Targets
2525

2626
| JVM | Android | iOS | macOS | tvOS | watchOS | Linux | Windows | JS | Wasm |

‎build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
alias(libs.plugins.vanniktech.mavenPublish) apply false
55
alias(libs.plugins.compose) apply false
66
alias(libs.plugins.compose.compiler) apply false
7+
alias(libs.plugins.dokka) apply false
78
}
89

910
allprojects {

‎gradle.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#Gradle
22
org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
3+
#Dokka
4+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
35
kotlin.daemon.jvmargs=-Xmx4096M
46
org.gradle.caching=true
57
org.gradle.configuration-cache=true

‎gradle/libs.versions.toml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ compose-version = "1.10.3"
88
lets-plot-kotlin = "4.13.0"
99
lets-plot = "4.8.2"
1010
lets-plot-platf = "4.9.0"
11+
dokka = "2.0.0"
1112

1213
[libraries]
1314
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -20,4 +21,5 @@ android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.
2021
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
2122
vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
2223
compose = { id = "org.jetbrains.compose", version.ref = "compose-version" }
23-
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
24+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
25+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

‎library/build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
alias(libs.plugins.kotlinMultiplatform)
77
alias(libs.plugins.android.kotlin.multiplatform.library)
88
alias(libs.plugins.vanniktech.mavenPublish)
9+
alias(libs.plugins.dokka)
910
}
1011

1112
group = "io.github.linde9821"

0 commit comments

Comments
 (0)