Skip to content

Commit 4a484c5

Browse files
SaBie73SaGematiktobias-schwerdtfeger
authored
Add Dokka documentation configuration and custom styles (#3)
* Add Dokka documentation configuration and custom styles * Add GitHub Actions workflow for deploying Dokka documentation to GitHub Pages --------- Co-authored-by: sandra.bieseke <sandra.bieseke@gematik.de> Co-authored-by: Tobias Schwerdtfeger <this@tobias-schwerdtfeger.dev>
1 parent a5eadc7 commit 4a484c5

File tree

790 files changed

+115047
-14
lines changed

Some content is hidden

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

790 files changed

+115047
-14
lines changed

.github/workflows/dokka.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy dokka documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Setup Pages
28+
uses: actions/configure-pages@v5
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: 'docs/api'
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v4

build.gradle.kts

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
1+
import org.jetbrains.dokka.DokkaDefaults.pluginsConfiguration
22
import java.util.Properties
33

44
/*
@@ -27,9 +27,6 @@ plugins {
2727
alias(libs.plugins.dokka) apply true
2828

2929
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3"
30-
// alias(libs.plugins.requirements)
31-
// alias(libs.plugins.licenseheader)
32-
// id("org.jetbrains.dokka") version "2.0.0"
3330

3431
id("de.gematik.openhealth.build")
3532
}
@@ -83,6 +80,14 @@ tasks.register<JacocoReport>("jacocoRootReport") {
8380
}
8481

8582
subprojects {
83+
apply(plugin = "org.jetbrains.dokka")
84+
dokka {
85+
pluginsConfiguration.html {
86+
customStyleSheets.from(rootDir.resolve("config/dokka/dokkaStyle.css"))
87+
customAssets.from(rootDir.resolve("config/dokka/gematik_logo_white.svg"))
88+
footerMessage.set("(c) Gematik GmbH")
89+
}
90+
}
8691
tasks.withType<Test> {
8792
finalizedBy(tasks.withType<JacocoReport>())
8893
}
@@ -172,9 +177,27 @@ detekt {
172177
)
173178
}
174179

180+
dokka {
181+
moduleName.set("OpenHealth - Core")
182+
183+
dokkaPublications.html {
184+
outputDirectory.set(rootDir.resolve("docs/api"))
185+
includes.from(project.layout.projectDirectory.file("README.md"))
186+
}
187+
188+
pluginsConfiguration.html {
189+
customStyleSheets.from(rootDir.resolve("config/dokka/dokkaStyle.css"))
190+
customAssets.from(rootDir.resolve("config/dokka/gematik_logo_white.svg"))
191+
footerMessage.set("© Gematik GmbH")
192+
}
193+
}
194+
175195
val ktlint by configurations.creating
176196

177197
dependencies {
198+
dokka(project(":asn1"))
199+
dokka(project(":crypto"))
200+
dokka(project(":smartcard"))
178201
ktlint(libs.ktlint.cli) {
179202
attributes {
180203
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))

config/dokka/dokkaStyle.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* logo custom rules styles */
2+
.library-name--link:before {
3+
background: url('../images/gematik_logo_white.svg') center no-repeat;
4+
content: "";
5+
height: 36px;
6+
width: 120px;
7+
}
Lines changed: 25 additions & 0 deletions
Loading

crypto-jvm-swig/build.gradle.kts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,17 @@ val generateJniWrapper by tasks.registering(Exec::class) {
5959
}
6060

6161
val patchGeneratedJava by tasks.registering {
62-
val inputFile = file("$rootOutputDir/java/de/gematik/openhealth/crypto/internal/interop/Uint8Vector.java")
62+
val inputFile =
63+
file("$rootOutputDir/java/de/gematik/openhealth/crypto/internal/interop/Uint8Vector.java")
6364
inputs.file(inputFile)
6465
outputs.file(inputFile)
6566
doLast {
6667
val content = inputFile.readText()
67-
val patched = content.replace(
68-
"public class Uint8Vector extends java.util.AbstractList<Byte> implements java.util.RandomAccess {",
69-
"public class Uint8Vector extends java.util.AbstractList<Byte> implements java.util.RandomAccess, ClassHandle {"
70-
)
68+
val patched =
69+
content.replace(
70+
"public class Uint8Vector extends java.util.AbstractList<Byte> implements java.util.RandomAccess {",
71+
"public class Uint8Vector extends java.util.AbstractList<Byte> implements java.util.RandomAccess, ClassHandle {",
72+
)
7173
inputFile.writeText(patched)
7274
}
7375
dependsOn(generateJniWrapper)

crypto-web-lib/build.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ val emcmakeSetup by tasks.registering(Exec::class) {
5353
commandLine(
5454
"bash",
5555
"-c",
56-
"source ${emscriptenDir}/emsdk_env.sh && emcmake cmake -DPROJECT_ROOT_DIR=$rootDir -GNinja -S $rootDir/libs/openssl/wrapper -B ${layout.buildDirectory.get().asFile}/cmake-build"
56+
"source $emscriptenDir/emsdk_env.sh && emcmake cmake -DPROJECT_ROOT_DIR=$rootDir -GNinja -S $rootDir/libs/openssl/wrapper -B ${layout.buildDirectory.get().asFile}/cmake-build",
5757
)
5858
}
5959

@@ -65,7 +65,7 @@ val emcmakeBuild by tasks.registering(Exec::class) {
6565
commandLine(
6666
"bash",
6767
"-c",
68-
"source ${emscriptenDir}/emsdk_env.sh && cmake --build $cmakeBuildDir --target oh_crypto",
68+
"source $emscriptenDir/emsdk_env.sh && cmake --build $cmakeBuildDir --target oh_crypto",
6969
)
7070
}
7171

@@ -87,7 +87,9 @@ val npmInstall by tasks.registering(Exec::class) {
8787

8888
val npxNodeConv by tasks.registering(Exec::class) {
8989
inputs.file("$cmakeBuildDir/oh_crypto.d.ts")
90-
outputs.file("$rootOutputDir/jsMainGenerated/kotlin/de/gematik/openhealth/crypto/internal/interop/crypto.kt")
90+
outputs.file(
91+
"$rootOutputDir/jsMainGenerated/kotlin/de/gematik/openhealth/crypto/internal/interop/crypto.kt",
92+
)
9193
workingDir("npm")
9294
commandLine(
9395
"npx",
@@ -98,7 +100,7 @@ val npxNodeConv by tasks.registering(Exec::class) {
98100
"--module-name",
99101
"CryptoModule",
100102
"$cmakeBuildDir/oh_crypto.d.ts",
101-
"$rootOutputDir/jsMainGenerated/kotlin/de/gematik/openhealth/crypto/internal/interop/crypto.kt"
103+
"$rootOutputDir/jsMainGenerated/kotlin/de/gematik/openhealth/crypto/internal/interop/crypto.kt",
102104
)
103105
dependsOn(emcmakeBuild)
104106
dependsOn(npmInstall)

crypto/src/commonTest/kotlin/de/gematik/openhealth/crypto/kem/KemTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package de.gematik.openhealth.crypto.kem
1818

1919
import de.gematik.openhealth.crypto.runTestWithProvider
20-
import kotlin.test.Ignore
2120
import kotlin.test.Test
2221
import kotlin.test.assertTrue
2322

crypto/src/commonTest/kotlin/de/gematik/openhealth/crypto/key/ECCurveTest.kt renamed to crypto/src/commonTest/kotlin/de/gematik/openhealth/crypto/key/EcCurveTest.kt

File renamed without changes.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<!doctype html>
2+
<html class="no-js">
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
5+
<title>Asn1DecoderException</title>
6+
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg"> <script>var pathToRoot = "../../../";</script>
7+
<script>document.documentElement.classList.replace("no-js","js");</script>
8+
<script>const storage = localStorage.getItem("dokka-dark-mode")
9+
if (storage == null) {
10+
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
11+
if (osDarkSchemePreferred === true) {
12+
document.getElementsByTagName("html")[0].classList.add("theme-dark")
13+
}
14+
} else {
15+
const savedDarkMode = JSON.parse(storage)
16+
if(savedDarkMode === true) {
17+
document.getElementsByTagName("html")[0].classList.add("theme-dark")
18+
}
19+
}
20+
</script>
21+
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
22+
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async></script>
23+
<link href="../../../styles/style.css" rel="Stylesheet">
24+
<link href="../../../styles/main.css" rel="Stylesheet">
25+
<link href="../../../styles/prism.css" rel="Stylesheet">
26+
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
27+
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
28+
<link href="../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
29+
<script type="text/javascript" src="../../../scripts/clipboard.js" async></script>
30+
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async></script>
31+
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async></script>
32+
<script type="text/javascript" src="../../../scripts/main.js" defer></script>
33+
<script type="text/javascript" src="../../../scripts/prism.js" async></script>
34+
<script type="text/javascript" src="../../../ui-kit/ui-kit.min.js" defer></script>
35+
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer></script>
36+
<link href="../../../images/gematik_logo_white.svg">
37+
<link href="../../../styles/dokkaStyle.css" rel="Stylesheet"></head>
38+
<body>
39+
<div class="root">
40+
<nav class="navigation theme-dark" id="navigation-wrapper">
41+
<a class="library-name--link" href="../../../index.html">
42+
OpenHealth - Core
43+
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
44+
</button>
45+
<div class="navigation-controls--break ui-kit_mobile-only"></div>
46+
<div class="library-version" id="library-version">
47+
</div>
48+
<div class="navigation-controls">
49+
<div class="filter-section filter-section_loading" id="filter-section">
50+
<button class="platform-tag platform-selector common-like" data-active="" data-filter=":asn1/commonMain">common</button>
51+
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
52+
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
53+
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox">
54+
<div class="dropdown--header"><span>Platform filter</span>
55+
<button class="button" data-role="dropdown-toggle" aria-label="Close platform filter">
56+
<i class="ui-kit-icon ui-kit-icon_cross"></i>
57+
</button>
58+
</div>
59+
<li role="option" class="dropdown--option platform-selector-option common-like" tabindex="0">
60+
<label class="checkbox">
61+
<input type="checkbox" class="checkbox--input" id=":asn1/commonMain" data-filter=":asn1/commonMain">
62+
<span class="checkbox--icon"></span>
63+
common
64+
</label>
65+
</li>
66+
</ul>
67+
<div class="dropdown--overlay"></div>
68+
</div>
69+
</div>
70+
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
71+
</button>
72+
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
73+
API
74+
</div>
75+
</div>
76+
</nav>
77+
<div id="container">
78+
<div class="sidebar" id="leftColumn">
79+
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
80+
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox">
81+
<div class="dropdown--header">
82+
<span>
83+
OpenHealth - Core
84+
</span>
85+
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
86+
<i class="ui-kit-icon ui-kit-icon_cross"></i>
87+
</button>
88+
</div>
89+
<div class="sidebar--inner" id="sideMenu"></div>
90+
</ul>
91+
<div class="dropdown--overlay"></div>
92+
</div>
93+
</div>
94+
<div id="main">
95+
<div class="main-content" data-page-type="member" id="content" pageids="asn1::de.gematik.openhealth.asn1/Asn1DecoderException/Asn1DecoderException/#kotlin.String/PointingToDeclaration//1572161152">
96+
<div class="breadcrumbs"><a href="../../index.html">asn1</a><span class="delimiter">/</span><a href="../index.html">de.gematik.openhealth.asn1</a><span class="delimiter">/</span><a href="index.html">Asn1DecoderException</a><span class="delimiter">/</span><span class="current">Asn1DecoderException</span></div>
97+
<div class="cover ">
98+
<h1 class="cover"><span>Asn1Decoder</span><wbr><span><span>Exception</span></span></h1>
99+
</div>
100+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":asn1/commonMain"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">message<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span></div><p class="paragraph">Constructs an <a href="index.html">Asn1DecoderException</a> with the specified detail message.</p><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":asn1/commonMain" data-filterable-set=":asn1/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>message</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The detail message string.</p></div></div></div></div></div><hr><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">message<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token punctuation">, </span></span><span class="parameter ">cause<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html">Throwable</a><span class="token operator">?</span></span></span><span class="token punctuation">)</span></div></div></div>
101+
</div>
102+
<div class="footer">
103+
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
104+
<span>(c) Gematik GmbH</span>
105+
<span class="pull-right">
106+
<span>Generated by </span>
107+
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
108+
<span>dokka</span>
109+
</a>
110+
</span>
111+
</div>
112+
</div>
113+
</div>
114+
</div>
115+
</body>
116+
</html>

0 commit comments

Comments
 (0)