Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshg committed Apr 26, 2017
1 parent 725bc4c commit 34631c7
Show file tree
Hide file tree
Showing 47 changed files with 783 additions and 1,050 deletions.
58 changes: 30 additions & 28 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,34 +119,6 @@ kotlin {
experimental.coroutines = ENABLE
}

/**
* Enable dokka task.
*/
tasks.withType<DokkaTask> {
val src = "src/main/kotlin"
val out = "$projectDir/docs"
doFirst {
println("Cleaning ${out.bold} directory...".cyan)
project.delete(out)
}

moduleName = ""
outputFormat = DokkaFormat.html.name
outputDirectory = out
includes = listOf("README.md")
val mapping = LinkMapping().apply {
dir = src
url = "https://github.com/sureshg/kotlin-starter/blob/master/$src"
suffix = "#L"
}
linkMappings = arrayListOf(mapping)
description = "Generate docs in $outputFormat format."

doLast {
println("Generated $outputFormat format docs to ${outputDirectory.bold}".done)
}
}

/**
* Enable java incremental compilation.
*/
Expand Down Expand Up @@ -259,6 +231,36 @@ task<FatCapsule>("makeExecutable") {
}


/**
* Generate doc using dokka.
*/
tasks.withType<DokkaTask> {
val src = "src/main/kotlin"
val out = "$projectDir/docs"
val format = DokkaFormat.KotlinWeb
doFirst {
println("Cleaning ${out.bold} directory...".cyan)
project.delete(out)
}

moduleName = ""
outputFormat = format.type
outputDirectory = out
jdkVersion = javaVersion.majorVersion.toInt()
includes = listOf("README.md")
val mapping = LinkMapping().apply {
dir = src
url = "https://github.com/sureshg/kotlin-starter/blob/master/$src"
suffix = "#L"
}
linkMappings = arrayListOf(mapping)
description = "Generate docs in ${format.desc} format."

doLast {
println("Generated ${format.desc} format docs to ${outputDirectory.bold}".done)
}
}

/**
* Generate Gradle Script Kotlin wrapper.
*/
Expand Down
13 changes: 7 additions & 6 deletions buildSrc/src/main/kotlin/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ fun Project.printHeader(version: Any?, embdKtVersion: String = embeddedKotlinVer
/**
* Dokka output format.
*/
enum class DokkaFormat(val desc: String) {
html("HTML Doc"),
markdown("Markdown(md) doc"),
gfm("GitHub-Flavored Markdown"),
jekyll("Markdown adapted for Jekyll sites"),
javadoc("Javadoc format")
enum class DokkaFormat(val type: String, val desc: String) {
Html("html", "HTML Doc"),
KotlinWeb("kotlin-website", "Kotlin Website"),
Markdown("markdown", "Markdown(md) doc"),
Gfm("gfm", "GitHub-Flavored Markdown"),
Jekyll("jekyll", "Markdown adapted for Jekyll sites"),
JavaDoc("javadoc", "Javadoc format")
}
27 changes: 0 additions & 27 deletions docs/alltypes/index.html

This file was deleted.

29 changes: 29 additions & 0 deletions docs/alltypes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: alltypes -
layout: api
---

:

### All Types

<table class="api-docs-table">
<tbody>
<tr>
<td markdown="1">
<a href="../io.sureshg/-ui-op/index.html">io.sureshg.UiOp</a>
</td>
<td markdown="1">

</td>
</tr>
<tr>
<td markdown="1">
<a href="../io.sureshg/-user/index.html">io.sureshg.User</a>
</td>
<td markdown="1">

</td>
</tr>
</tbody>
</table>
151 changes: 0 additions & 151 deletions docs/index-outline.html

This file was deleted.

60 changes: 0 additions & 60 deletions docs/index.html

This file was deleted.

Loading

0 comments on commit 34631c7

Please sign in to comment.