Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34631c7

Browse files
committed
Polish
1 parent 725bc4c commit 34631c7

Some content is hidden

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

47 files changed

+783
-1050
lines changed

build.gradle.kts

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -119,34 +119,6 @@ kotlin {
119119
experimental.coroutines = ENABLE
120120
}
121121

122-
/**
123-
* Enable dokka task.
124-
*/
125-
tasks.withType<DokkaTask> {
126-
val src = "src/main/kotlin"
127-
val out = "$projectDir/docs"
128-
doFirst {
129-
println("Cleaning ${out.bold} directory...".cyan)
130-
project.delete(out)
131-
}
132-
133-
moduleName = ""
134-
outputFormat = DokkaFormat.html.name
135-
outputDirectory = out
136-
includes = listOf("README.md")
137-
val mapping = LinkMapping().apply {
138-
dir = src
139-
url = "https://github.com/sureshg/kotlin-starter/blob/master/$src"
140-
suffix = "#L"
141-
}
142-
linkMappings = arrayListOf(mapping)
143-
description = "Generate docs in $outputFormat format."
144-
145-
doLast {
146-
println("Generated $outputFormat format docs to ${outputDirectory.bold}".done)
147-
}
148-
}
149-
150122
/**
151123
* Enable java incremental compilation.
152124
*/
@@ -259,6 +231,36 @@ task<FatCapsule>("makeExecutable") {
259231
}
260232

261233

234+
/**
235+
* Generate doc using dokka.
236+
*/
237+
tasks.withType<DokkaTask> {
238+
val src = "src/main/kotlin"
239+
val out = "$projectDir/docs"
240+
val format = DokkaFormat.KotlinWeb
241+
doFirst {
242+
println("Cleaning ${out.bold} directory...".cyan)
243+
project.delete(out)
244+
}
245+
246+
moduleName = ""
247+
outputFormat = format.type
248+
outputDirectory = out
249+
jdkVersion = javaVersion.majorVersion.toInt()
250+
includes = listOf("README.md")
251+
val mapping = LinkMapping().apply {
252+
dir = src
253+
url = "https://github.com/sureshg/kotlin-starter/blob/master/$src"
254+
suffix = "#L"
255+
}
256+
linkMappings = arrayListOf(mapping)
257+
description = "Generate docs in ${format.desc} format."
258+
259+
doLast {
260+
println("Generated ${format.desc} format docs to ${outputDirectory.bold}".done)
261+
}
262+
}
263+
262264
/**
263265
* Generate Gradle Script Kotlin wrapper.
264266
*/

buildSrc/src/main/kotlin/Extensions.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ fun Project.printHeader(version: Any?, embdKtVersion: String = embeddedKotlinVer
5959
/**
6060
* Dokka output format.
6161
*/
62-
enum class DokkaFormat(val desc: String) {
63-
html("HTML Doc"),
64-
markdown("Markdown(md) doc"),
65-
gfm("GitHub-Flavored Markdown"),
66-
jekyll("Markdown adapted for Jekyll sites"),
67-
javadoc("Javadoc format")
62+
enum class DokkaFormat(val type: String, val desc: String) {
63+
Html("html", "HTML Doc"),
64+
KotlinWeb("kotlin-website", "Kotlin Website"),
65+
Markdown("markdown", "Markdown(md) doc"),
66+
Gfm("gfm", "GitHub-Flavored Markdown"),
67+
Jekyll("jekyll", "Markdown adapted for Jekyll sites"),
68+
JavaDoc("javadoc", "Javadoc format")
6869
}

docs/alltypes/index.html

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

docs/alltypes/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: alltypes -
3+
layout: api
4+
---
5+
6+
:
7+
8+
### All Types
9+
10+
<table class="api-docs-table">
11+
<tbody>
12+
<tr>
13+
<td markdown="1">
14+
<a href="../io.sureshg/-ui-op/index.html">io.sureshg.UiOp</a>
15+
</td>
16+
<td markdown="1">
17+
18+
</td>
19+
</tr>
20+
<tr>
21+
<td markdown="1">
22+
<a href="../io.sureshg/-user/index.html">io.sureshg.User</a>
23+
</td>
24+
<td markdown="1">
25+
26+
</td>
27+
</tr>
28+
</tbody>
29+
</table>

docs/index-outline.html

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

docs/index.html

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

0 commit comments

Comments
 (0)