diff options
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug.md | 38 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.md | 21 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/question.md | 22 | ||||
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | README.md | 26 | ||||
-rw-r--r-- | build.gradle | 9 | ||||
-rw-r--r-- | buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/Model/PackageDocs.kt | 3 |
8 files changed, 115 insertions, 10 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000..11d748b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,38 @@ +--- +name: Bug +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is + +**Expected behaviour** +A clear and concise description of what you expected to happen + +**Screenshots** +If applicable, add screenshots to help explain your problem + +**To Reproduce** +Steps to reproduce the behavior, ideally with an example project + +**Dokka configuration** +Configuration of dokka used to reproduce the bug + +```groovy +dokka { + outputFormat = 'html' + ... +} +``` + +**Installation** +- Operating system: macOS/Windows/Linux +- Build tool: Gradle v5.6.0/Maven/Cli/3rd party plugin +- Dokka version: 0.10.0 + +**Additional context** +Add any other context about the problem here diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..3666d865 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +You can also paste a link to the relevant issue + +**Describe the solution you'd like** +A clear and concise description of what you want to happen + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered + +**Additional context** +Add any other context or screenshots about the feature request here diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..6a3e22ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,22 @@ +--- +name: Question +about: Ask a question about dokka +title: '' +labels: question +assignees: '' + +--- + +**Question** +Your question + +**Screenshots** +If applicable, add screenshots to help explain your problem + +**Installation** +- Operating system: macOS/Windows/Linux +- Build tool: Gradle v5.6.0/Maven/Cli/3rd party plugin +- Dokka version: 0.10.0 + +**Additional context** +Add any other context about the problem here @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright 2014-2019 JetBrains s.r.o. and Dokka project contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -455,8 +455,8 @@ The available configuration options are shown below: <!-- List of '.md' files with package and module docs --> <!-- https://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation --> <includes> - <file>packages.md</file> - <file>extra.md</file> + <include>packages.md</include> + <include>extra.md</include> </includes> <!-- List of sample roots --> @@ -638,3 +638,25 @@ doesn't affect analysis of source code, it just changes the result. You can thin Dokka is built with Gradle. To build it, use `./gradlew build`. Alternatively, open the project directory in IntelliJ IDEA and use the IDE to build and run dokka. + +Here's how to import and configure Dokka in IntelliJ IDEA: + * Select "Open" from the IDEA welcome screen, or File > Open if a project is + already open +* Select the directory with your clone of Dokka + * Note: IDEA may have an error after the project is initally opened; it is OK + to ignore this as the next step will address this error +* After IDEA opens the project, select File > New > Module from existing sources + and select the `build.gradle` file from the root directory of your Dokka clone +* Use the default options and select "OK" +* After Dokka is loaded into IDEA, open the Gradle tool window (View > Tool + Windows > Gradle) and click on the top left "Refresh all Gradle projects" + button +* Verify the following project settings. In File > Settings > Build, Execution, + Deployment > Build Tools > Gradle > Runner: + * Ensure "Delegate IDE build/run actions to gradle" is checked + * "Gradle Test Runner" should be selected in the "Run tests using" drop-down + menu +* Note: After closing and re-opening the project, IDEA may give an error + message: "Error Loading Project: Cannot load 3 modules". Open up the details + of the error, and click "Remove Selected", as these module `.iml` files are + safe to remove. diff --git a/build.gradle b/build.gradle index f197e1f7..73636b24 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,10 @@ import org.jetbrains.DependenciesVersionGetter allprojects { ext { - final String buildNumber = System.getenv("BUILD_NUMBER") - dokka_version = dokka_version_base + ( buildNumber == null || System.getenv("FORCE_SNAPSHOT") != null ? "-SNAPSHOT" : "-$buildNumber" ) + if (!project.findProperty("dokka_version")) { + final String buildNumber = System.getenv("BUILD_NUMBER") + dokka_version = dokka_version_base + (buildNumber == null || System.getenv("FORCE_SNAPSHOT") != null ? "-SNAPSHOT" : "-$buildNumber") + } } if (project == rootProject) { @@ -42,12 +44,11 @@ allprojects { maven { url "https://dl.bintray.com/jetbrains/markdown" } maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" } - maven { url 'https://jitpack.io' } maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$bundled_kotlin_compiler_version/maven" } ivy(repo) maven { url "https://kotlin.bintray.com/kotlinx" } maven { url "https://dl.bintray.com/kotlin/kotlinx" } - maven { url "https://dl.bintray.com/orangy/maven" } // TODO: remove this repository when kotlinx.cli is available in maven + maven { url "https://dl.bintray.com/orangy/maven" } // TODO: remove this repository when kotlinx.cli is available in maven } } diff --git a/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy b/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy index 4f6dcd75..62cc3d3c 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy @@ -36,5 +36,5 @@ private static void addDependency(Node dependenciesNode, dep) { dependencyNode.appendNode('groupId', dep.group) dependencyNode.appendNode('artifactId', dep.name) dependencyNode.appendNode('version', dep.version) - dependencyNode.appendNode('scope', 'runtime') -}
\ No newline at end of file + dependencyNode.appendNode('scope', 'compile') +} diff --git a/core/src/main/kotlin/Model/PackageDocs.kt b/core/src/main/kotlin/Model/PackageDocs.kt index cf6cd808..b24efc5d 100644 --- a/core/src/main/kotlin/Model/PackageDocs.kt +++ b/core/src/main/kotlin/Model/PackageDocs.kt @@ -7,6 +7,7 @@ import com.intellij.psi.PsiClass import com.intellij.psi.PsiFileFactory import com.intellij.psi.util.PsiTreeUtil import com.intellij.util.LocalTimeCounter +import com.intellij.openapi.util.text.StringUtil import org.intellij.markdown.MarkdownElementTypes import org.intellij.markdown.MarkdownTokenTypes import org.intellij.markdown.parser.LinkMap @@ -30,7 +31,7 @@ class PackageDocs fun parse(fileName: String, linkResolveContext: List<PackageFragmentDescriptor>) { val file = File(fileName) if (file.exists()) { - val text = file.readText() + val text = StringUtil.convertLineSeparators(file.readText()) val tree = parseMarkdown(text) val linkMap = LinkMap.buildLinkMap(tree.node, text) var targetContent: MutableContent = moduleContent |