From ec3dce19b16a335776a381a90f668cc249acb631 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 6 Nov 2018 17:51:39 +0100 Subject: chore: Add support for project wide documentation generation This change adds support for generating documentation for all modules of the repository using Dokka. --- gradle/dokka.gradle | 47 +++++++++++++++++++++++++++++++++++++++++++++++ gradle/kotlin.gradle | 5 ----- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 gradle/dokka.gradle (limited to 'gradle') diff --git a/gradle/dokka.gradle b/gradle/dokka.gradle new file mode 100644 index 00000000..e8e47d2d --- /dev/null +++ b/gradle/dokka.gradle @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2018 atlarge-research + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* Documentation generation for project */ +apply plugin: 'org.jetbrains.dokka' + +repositories { + jcenter() +} + +dokka { + moduleName = 'odcsim' + outputFormat = 'html' + kotlinTasks { + subprojects.compileKotlin + } + includes = ['docs/packages.md'] + samples = [] + jdkVersion = 8 + + linkMapping { + dir = rootProject.projectDir.absolutePath + url = "$github_url/tree/master" + suffix = '#L' + } +} diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index 6e85235d..e24a3c70 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -24,7 +24,6 @@ /* Default configuration for Kotlin projects */ apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.dokka' apply plugin: 'org.jlleitschuh.gradle.ktlint' apply plugin: 'jacoco' @@ -63,7 +62,3 @@ jacocoTestReport { html.enabled = true } } - -/* Documentation generation */ -dokka {} - -- cgit v1.2.3