Skip to content

Commit 2e51d0c

Browse files
authored
Merge pull request #253 from FusionAuth/miker/org.jetbrains.dokka-dropped-support
Use dokka v2 to generate html vs markdown documentation.
2 parents 72fe708 + 4563cec commit 2e51d0c

File tree

150 files changed

+60
-1981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+60
-1981
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Dokka Docs
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
16+
- name: Setup Java
17+
uses: actions/setup-java@v5
18+
with:
19+
distribution: 'temurin'
20+
java-version: '21'
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
24+
25+
- name: Build Dokka HTML
26+
run: ./gradlew dokkaGenerateHtml
27+
28+
- name: Determine deployment path
29+
id: deploy-path
30+
run: |
31+
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
32+
echo "path=." >> $GITHUB_OUTPUT
33+
else
34+
BRANCH_NAME=$(echo ${{ github.ref }} | sed 's/refs\/heads\///' | sed 's/\//-/g')
35+
echo "path=$BRANCH_NAME" >> $GITHUB_OUTPUT
36+
fi
37+
38+
- name: Deploy to GitHub Pages
39+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./build/library/docs
43+
destination_dir: ${{ steps.deploy-path.outputs.path }}
44+
keep_files: true # Important! Prevents deleting other directories
45+

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ The pre-release process is as follows:
9090
- Compare the gradlew version `./gradlew -v` with the latest [gradle release](https://gradle.org/releases/) and update if necessary.
9191
- Review, test and merge any open [Dependency Pull Requests](https://github.com/FusionAuth/fusionauth-android-sdk/pulls).
9292
- Update the version in the `library/build.gradle.kts` file with a pre-release version according to the [Semantic Versioning](https://semver.org/) guidelines.
93-
- Update the documentation with `./gradlew dokkaGfm`.
9493
- Commit the changes with the commit message `chore(release): <pre-release-version> 🎉`.
9594
- Create a new tag `v<pre-release-version>`.
9695
- Make sure all Workflows where successful in [Actions](https://github.com/FusionAuth/fusionauth-android-sdk/actions).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ end::forDocSiteQuickstart[]
199199
<!--
200200
tag::forDocSiteDocumentation[]
201201
-->
202-
See the latest [Full library documentation](https://github.com/FusionAuth/fusionauth-android-sdk/blob/main/library/docs/index.md) for the complete documentation of the SDK.
202+
See the latest [Full library documentation](https://fusionauth.github.io/fusionauth-android-sdk/index.html) for the complete documentation of the SDK.
203203
<!--
204204
end::forDocSiteDocumentation[]
205205
-->

build.gradle.kts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
88
id("com.android.library") version "8.13.0" apply false
99
id("io.gitlab.arturbosch.detekt") version "1.23.8"
10-
id("org.jetbrains.dokka") version "2.0.0"
10+
id("org.jetbrains.dokka") version "2.1.0"
1111
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
1212

1313
kotlin("jvm") version "2.2.0"
@@ -48,4 +48,14 @@ nexusPublishing {
4848
password.set("your-password") // defaults to project.properties["myNexusPassword"]
4949
}
5050
}
51+
}
52+
53+
dokka {
54+
dokkaPublications.html {
55+
outputDirectory.set(rootDir.resolve("build/library/docs"))
56+
57+
dokkaSourceSets.named("main") {
58+
sourceRoots.from(file("library/src/main/java"))
59+
}
60+
}
5161
}

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ kotlin.code.style=official
2020
# Enables namespacing of each library's R class so that its R class includes only the
2121
# resources declared in the library itself and none from the library's dependencies,
2222
# thereby reducing the size of the R class for that library
23-
android.nonTransitiveRClass=true
23+
android.nonTransitiveRClass=true
24+
# activates the DGP v2 plugin with migration helpers
25+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

library/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,3 @@ dependencies {
183183
androidTestImplementation("androidx.test.ext:junit:1.3.0")
184184
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
185185
}
186-
187-
tasks.dokkaGfm {
188-
outputDirectory.set(layout.projectDirectory.dir("docs"))
189-
}

library/docs/index.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

library/docs/library/io.fusionauth.mobilesdk.exceptions/-authorization-exception/-authorization-exception.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

library/docs/library/io.fusionauth.mobilesdk.exceptions/-authorization-exception/-companion/from-exception.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

library/docs/library/io.fusionauth.mobilesdk.exceptions/-authorization-exception/-companion/index.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)