Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

Commit 245d7a8

Browse files
committed
docs: dokka
1 parent d5b54c5 commit 245d7a8

355 files changed

Lines changed: 47398 additions & 1 deletion

File tree

Some content is hidden

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

README.md

Whitespace-only changes.

build.gradle.kts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import java.time.Year
44
plugins {
55
id("java")
66
id("me.champeau.jmh") version "0.7.2"
7+
id("org.jetbrains.dokka") version "2.0.0"
78
id("maven-publish")
89
}
910

@@ -58,7 +59,42 @@ task("justPublish") {
5859
dependsOn(tasks["publishLibPublicationToGhRepository"])
5960
}
6061

62+
dokka {
63+
val docsFolder = layout.projectDirectory.dir("docs").dir("public")
64+
65+
moduleName.set("AutoJSON")
66+
67+
dokkaPublications.html {
68+
outputDirectory.set(docsFolder.dir("dokka"))
69+
suppressInheritedMembers.set(true)
70+
failOnWarning.set(true)
71+
}
72+
73+
dokkaSourceSets.configureEach {
74+
includes.from("README.md")
75+
jdkVersion.set(17)
76+
77+
externalDocumentationLinks.register("jdk17") {
78+
url("https://docs.oracle.com/en/java/javase/17/docs/api/")
79+
packageListUrl("https://docs.oracle.com/en/java/javase/17/docs/api/element-list")
80+
}
81+
82+
sourceLink {
83+
localDirectory.set(file("src/main/java"))
84+
remoteUrl("https://github.com/DrTheodor/autojson/blob/main/")
85+
remoteLineSuffix.set("#L")
86+
}
87+
}
88+
pluginsConfiguration.html {
89+
//customStyleSheets.from("styles.css")
90+
//customAssets.from("logo.png")
91+
footerMessage.set("(c) DrTheo_")
92+
}
93+
}
94+
6195
tasks.javadoc {
96+
val docsFolder = layout.projectDirectory.dir("docs").dir("public")
97+
6298
options {
6399
this as StandardJavadocDocletOptions
64100

@@ -80,13 +116,15 @@ tasks.javadoc {
80116
""".trimIndent()
81117

82118
links("https://docs.oracle.com/en/java/javase/17/docs/api/")
119+
120+
addStringOption("stylesheetfile", docsFolder.file("javadocs.css").asFile.absolutePath)
83121
}
84122

85123
if (JavaVersion.current().isJava9Compatible) {
86124
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
87125
}
88126

89-
setDestinationDir(layout.projectDirectory.dir("docs").dir("public").dir("javadocs").asFile)
127+
setDestinationDir(docsFolder.dir("javadocs").asFile)
90128
}
91129

92130
tasks["publishLibPublicationToGhRepository"].finalizedBy("pushMavenRepo")

docs/javadocs.css

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
/* Taken from https://github.com/azurite-engine/Javadoc-stylesheet */
2+
/* Created with Javadoc-Themer built by Nishant */
3+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
4+
@import url(//db.onlinewebfonts.com/c/1db29588408eadbd4406aae9238555eb?family=Consolas);
5+
6+
body {
7+
background-color: #141414;
8+
color: #ffffff;
9+
font-family: 'Roboto';
10+
font-size: 76%;
11+
margin: 0;
12+
}
13+
14+
dl.notes > dd, code, #class-description > div.block {
15+
font-family: 'Roboto';
16+
}
17+
18+
body > div.flex-box > div > main {
19+
max-width: 1080px;
20+
min-width: 800px;
21+
width: 90%;
22+
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 9px 0px;
23+
border-radius: 5px;
24+
margin: 0 auto;
25+
margin-top: 20px;
26+
}
27+
28+
.top-nav {
29+
background: white;
30+
}
31+
32+
#navbar-top-firstrow > li:child():not(a) {
33+
background: red;
34+
}
35+
36+
#navbar-top-firstrow > li {
37+
color: cornflowerblue;
38+
}
39+
40+
.nav-bar-cell1-rev {
41+
background-color: rgba(0, 0, 0, 0);
42+
font-weight: bold;
43+
}
44+
45+
/* A - LINKS */
46+
a:link, a, #navbar-top-firstrow > li > a{
47+
color: cornflowerblue;
48+
font-weight: normal;
49+
text-decoration: none;
50+
border-bottom: 1px solid rgba(0, 0, 0, 0);
51+
}
52+
53+
a:link:visited, a:visited {
54+
color: cornflowerblue;
55+
text-decoration: none;
56+
}
57+
a:link:hover, a:hover,
58+
#navbar-top-firstrow > li > a:hover,
59+
body > div.flex-box > div > main > div.header > div > a:hover,
60+
body > div.flex-box > header > nav > div.sub-nav > div:nth-child(1) > ul:nth-child(1) > li > a:hover,
61+
#class-description > div.block > a:hover > code,
62+
body > div.flex-box > div > main > div.inheritance > a:hover,
63+
#class-description > div.type-signature > span.extends-implements > a:hover {
64+
color: cornflowerblue;
65+
border-bottom: 1px solid cornflowerblue;
66+
}
67+
a:link:focus, a:focus {
68+
color: cornflowerblue;
69+
font-weight: bold;
70+
text-decoration: none;
71+
}
72+
a:link:active, a:active {
73+
color: #4c6b87;
74+
text-decoration: none;
75+
}
76+
a[name] {
77+
color: #141414;
78+
}
79+
a[name]:hover {
80+
color: #141414;
81+
text-decoration: none;
82+
}
83+
84+
/* details navigation links */
85+
body > div.flex-box > header > nav > div.sub-nav > div:nth-child(1) > ul:nth-child(2),
86+
body > div.flex-box > header > nav > div.sub-nav > div:nth-child(1) > ul:nth-child(1) > li:nth-child(2), #navbar-top-firstrow > li:nth-child(7),
87+
#class-description > hr,
88+
body > div.flex-box > div > main > div.inheritance {
89+
display: none;
90+
}
91+
.sub-nav {
92+
border-top: 1px solid #dfe3e5;
93+
background-color: white;
94+
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 9px 0px;
95+
float: left;
96+
overflow: hidden;
97+
width: 100%;
98+
99+
}
100+
#search-input {
101+
background: white;
102+
padding: 5px 10px;
103+
border-radius: 10px;
104+
border: 1px solid #dfe3e5;
105+
color: #a3a5a7;
106+
margin-right: 20px;
107+
/* box-shadow: rgb(0 0 0 / 5%) 0px 6px 9px 0px; */
108+
}
109+
body > div.flex-box > header > nav > div.sub-nav > div.nav-list-search > label {
110+
display: none;
111+
}
112+
body > div.flex-box > header > nav > div.sub-nav > div:nth-child(1) {
113+
margin-top: 2px;
114+
}
115+
#reset-button {
116+
display:none;
117+
}
118+
.sub-nav div {
119+
clear: left;
120+
float: left;
121+
padding: 0 0 5px 6px;
122+
}
123+
124+
125+
.type-signature, pre {
126+
background: #f5f8fa;
127+
padding: 10px;
128+
border-radius:6px;
129+
font-family: 'Consolas', monospace;
130+
}
131+
132+
section#field-summary, section#constructor-summary, section#method-summary, section#nested-class-summary {
133+
background: white;
134+
border: none;
135+
margin-left: -10px;
136+
}
137+
138+
section#field-detail, section#constructor-detail, section#method-detail,
139+
#field-summary > div.caption,
140+
#constructor-summary > div.caption,
141+
#nested-class-summary > div.caption,
142+
#all-packages-table > div.caption > span,
143+
#class > div.caption > span,
144+
#method > div.caption > span {
145+
display: none;
146+
}
147+
148+
#field-summary > h2, #constructor-summary > h2, #method-summary > h2, #nested-class-summary > h2 {
149+
font-style: normal;
150+
}
151+
152+
/* Inheritance declarations */
153+
body.class-declaration-page .summary h3,
154+
body.class-declaration-page .details h3,
155+
body.class-declaration-page .summary .inherited-list h2 {
156+
background: none;
157+
border: none;
158+
font-weight: normal;
159+
font-size: 15px;
160+
161+
}
162+
163+
.table-header, .odd-row-color, .odd-row-color .table-header {
164+
background: #f5f8fa;
165+
border: none;
166+
}
167+
168+
.summary-table {
169+
border: none;
170+
border-radius: 6px;
171+
}
172+
173+
.summary-table div, body > div.flex-box > div > main > dl > dd > div {
174+
font-family: 'Roboto';
175+
}
176+
177+
code a:link:not(:hover), .summary-table div > code > a:not(:hover) {
178+
color: #434c5d;
179+
border-bottom: 1px solid #b4b4b4;
180+
}
181+
182+
main a[href*="://"]::after {
183+
display: none;
184+
}
185+
186+
div.table-tabs > button.active-table-tab, #related-package-summary > div.caption > span, #class-summary > div.caption > span {
187+
background: #f5f8fa;
188+
color: #434c5d;
189+
font-weight: normal;
190+
border-radius: 6px;
191+
padding-top: 10px;
192+
border-bottom-left-radius: 0px;
193+
border-bottom-right-radius: 0px;
194+
margin-left: 0px;
195+
}
196+
div.table-tabs > button.table-tab {
197+
background: white;
198+
color: #434c5d;
199+
font-weight: normal;
200+
}
201+
202+
.deprecation-block {
203+
background: #ffe9e9;
204+
padding: 2px 6px;
205+
border: none;
206+
border-radius: 6px;
207+
font-weight: normal;
208+
font-family: 'Roboto';
209+
}
210+
211+
#ui-id-1 .ui-state-active {
212+
background: #f5f8fa;
213+
border-color: #f5f8fa;
214+
}
215+
216+
#ui-id-1 {
217+
border-radius: 6px;
218+
overflow-x: hidden;
219+
border: none;
220+
}
221+
222+
/* Search results */
223+
ul.ui-autocomplete li {
224+
background: white;
225+
color: #434c5d;
226+
font-family: 'Roboto'
227+
}
228+

0 commit comments

Comments
 (0)