aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-04-24 23:13:28 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-04-24 23:13:28 +0300
commit05e68c05227988d7a7b93361c16a15054e1f9429 (patch)
tree2ec752e146c71e121fd3eb10045ce039821dc97b /runners/gradle-plugin/src/main
parent18fb5468f00e737dd7e39001f864caaa7f591b11 (diff)
downloaddokka-05e68c05227988d7a7b93361c16a15054e1f9429.tar.gz
dokka-05e68c05227988d7a7b93361c16a15054e1f9429.tar.bz2
dokka-05e68c05227988d7a7b93361c16a15054e1f9429.zip
Fix NPE in gradle plugin
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index e7c7b99a..959698c3 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -116,11 +116,10 @@ open class DokkaTask : DefaultTask() {
}
}
- val COLORS_ENABLED_PROPERTY = "kotlin.colors.enabled"
@TaskAction
fun generate() {
- val kotlinColorsEnabledBefore = System.getProperty(COLORS_ENABLED_PROPERTY)
+ val kotlinColorsEnabledBefore = System.getProperty(COLORS_ENABLED_PROPERTY) ?: "false"
System.setProperty(COLORS_ENABLED_PROPERTY, "false")
try {
loadFatJar()
@@ -208,6 +207,10 @@ open class DokkaTask : DefaultTask() {
@OutputDirectory
fun getOutputDirectoryAsFile(): File = project.file(outputDirectory)
+
+ companion object {
+ const val COLORS_ENABLED_PROPERTY = "kotlin.colors.enabled"
+ }
}
open class LinkMapping : Serializable {