Skip to content

Commit 7966873

Browse files
authored
dataconnect: demo: Setup dokka (#7033)
1 parent 6a85149 commit 7966873

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/dataconnect_demo_app.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,19 @@ jobs:
106106
set -x
107107
firebase-dataconnect/demo/gradlew \
108108
--project-dir firebase-dataconnect/demo \
109-
--no-daemon \
110109
${{ (inputs.gradleInfoLog && '--info') || '' }} \
111110
--profile \
112111
-PdataConnect.demo.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
113112
assemble test
114113
114+
- name: gradle dokkaGeneratePublicationHtml
115+
run: |
116+
set -x
117+
firebase-dataconnect/demo/gradlew \
118+
--project-dir firebase-dataconnect/demo \
119+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
120+
dokkaGeneratePublicationHtml
121+
115122
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
116123
with:
117124
name: apks
@@ -126,6 +133,13 @@ jobs:
126133
if-no-files-found: warn
127134
compression-level: 9
128135

136+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
137+
with:
138+
name: ktdoc
139+
path: firebase-dataconnect/demo/build/dokka/html
140+
if-no-files-found: warn
141+
compression-level: 9
142+
129143
spotlessCheck:
130144
continue-on-error: false
131145
runs-on: ubuntu-latest

firebase-dataconnect/demo/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ plugins {
3131
// The following code in this "plugins" block can be omitted from customer
3232
// facing documentation as it is an implementation detail of this application.
3333
id("com.diffplug.spotless") version "7.0.0.BETA4"
34+
35+
id("org.jetbrains.dokka") version "2.0.0"
3436
}
3537

3638
dependencies {
@@ -55,6 +57,13 @@ dependencies {
5557
implementation("io.kotest.extensions:kotest-property-arbs:2.1.2")
5658
}
5759

60+
dokka {
61+
moduleName.set("Data Connect Demo")
62+
dokkaSourceSets.main {
63+
sourceRoots.from(layout.buildDirectory.dir("dataConnect/generatedSources/").get())
64+
}
65+
}
66+
5867
// The remaining code in this file can be omitted from customer facing
5968
// documentation. It's here just to make things compile and/or configure
6069
// optional components of the build (e.g. spotless code formatting).

firebase-dataconnect/demo/gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ android.useAndroidX=true
66

77
org.gradle.jvmargs=-Xmx2g
88

9+
// Use Dokka Gradle Plugin v2, which is technically "experimental"
10+
// but is fine for our purposes.
11+
// https://kotlinlang.org/docs/dokka-migration.html
12+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
13+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
14+
915
// The path of the "firebase" command to use.
1016
// If not specified, then "firebase" is used, resolved using the PATH environment variable.
1117
// See build.gradle.kts for details.

0 commit comments

Comments
 (0)