Skip to content

Commit a2dd077

Browse files
Alex009Abdulsalam-j
authored andcommitted
setup dokka publish
1 parent 3240e5e commit a2dd077

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

.github/workflows/dokka.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and publish dokka
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
jobs:
8+
build:
9+
runs-on: macos-11
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up JDK 11
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
- name: Build dokka
17+
run: ./gradlew dokkaHtmlMultiModule
18+
shell: bash
19+
- name: Move dokka results
20+
run: mv build/dokka/htmlMultiModule public
21+
shell: bash
22+
- name: Upload artifact
23+
uses: actions/upload-pages-artifact@v1
24+
with:
25+
path: ./public
26+
27+
deploy:
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
needs: build
33+
steps:
34+
- name: Deploy to GitHub Pages
35+
id: deployment
36+
uses: actions/deploy-pages@v2

build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
import org.jetbrains.dokka.gradle.DokkaTaskPartial
6+
57
buildscript {
68
repositories {
79
mavenCentral()
@@ -13,6 +15,7 @@ buildscript {
1315
classpath(":mvvm-build-logic")
1416
classpath(libs.kswiftGradlePlugin)
1517
classpath(libs.composeJetBrainsGradlePlugin)
18+
classpath(libs.dokkaGradlePlugin)
1619
}
1720
}
1821

@@ -40,10 +43,10 @@ allprojects {
4043
force(rootProject.libs.coroutines)
4144
}
4245
}
43-
}
4446

45-
// temporary fix for Apple Silicon (remove after 1.6.20 update)
46-
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
47-
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion =
48-
"16.0.0"
47+
apply(plugin = "org.jetbrains.dokka")
48+
49+
tasks.withType<DokkaTaskPartial>().configureEach {
50+
this.enabled = name.startsWith("mvvm-")
51+
}
4952
}

0 commit comments

Comments
 (0)