Skip to content

Commit 345a029

Browse files
authored
[#10] Library Internal Documentation Automation With Dokka (#11)
1 parent 33b4c7d commit 345a029

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.github/workflows/dokka.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pebble Dokka
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: 11
19+
distribution: "temurin"
20+
21+
- name: permissions
22+
run: chmod +x gradlew
23+
24+
- name: Build Documentation
25+
run: ./gradlew dokkaHtml
26+
27+
- name: Deploy Documentation to GitHub Pages
28+
uses: JamesIves/github-pages-deploy-action@v4
29+
with:
30+
BRANCH: gh-pages
31+
FOLDER: pebble/build/dokka/html

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ plugins {
44
alias(libs.plugins.kotlin.android) apply false
55
alias(libs.plugins.kotlin.compose) apply false
66
alias(libs.plugins.android.library) apply false
7+
alias(libs.plugins.dokka) apply false
78
}

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ composeBom = "2024.09.00"
1111
appcompat = "1.7.0"
1212
material = "1.12.0"
1313
vanniktech = "0.31.0"
14+
dokka = "2.0.0"
1415

1516
[libraries]
1617
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -36,3 +37,4 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
3637
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
3738
android-library = { id = "com.android.library", version.ref = "agp" }
3839
vanniktech = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech" }
40+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

pebble/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
alias(libs.plugins.android.library)
55
alias(libs.plugins.kotlin.android)
66
alias(libs.plugins.vanniktech)
7+
alias(libs.plugins.dokka)
78
}
89

910
android {
@@ -35,6 +36,14 @@ android {
3536
}
3637
}
3738

39+
tasks.dokkaHtml.configure {
40+
dokkaSourceSets {
41+
named("main") {
42+
noAndroidSdkLink.set(false)
43+
}
44+
}
45+
}
46+
3847
dependencies {
3948

4049
implementation(libs.androidx.core.ktx)

0 commit comments

Comments
 (0)