aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/main.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-07-08 12:55:26 +0200
committerDmitry Jemerov <yole@jetbrains.com>2016-07-08 12:55:26 +0200
commit95a606f54604d673a8bda00f19dae81463925475 (patch)
tree94979d9f7eac102a8254f170a39a860c7df1e2ba /core/src/main/kotlin/main.kt
parent0f65cf0e4ce531715b76ac32a36a3dff488b2d70 (diff)
downloaddokka-95a606f54604d673a8bda00f19dae81463925475.tar.gz
dokka-95a606f54604d673a8bda00f19dae81463925475.tar.bz2
dokka-95a606f54604d673a8bda00f19dae81463925475.zip
update Kotlin compiler and kotlin-ide-common to 1.0.4-dev-13, fixing the qualified name resolve problem in doc comments
Diffstat (limited to 'core/src/main/kotlin/main.kt')
-rw-r--r--core/src/main/kotlin/main.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/src/main/kotlin/main.kt b/core/src/main/kotlin/main.kt
index 30a33a96..22859187 100644
--- a/core/src/main/kotlin/main.kt
+++ b/core/src/main/kotlin/main.kt
@@ -17,7 +17,7 @@ import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.cli.common.messages.MessageRenderer
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot
-import org.jetbrains.kotlin.config.CommonConfigurationKeys
+import org.jetbrains.kotlin.config.JVMConfigurationKeys
import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel
import org.jetbrains.kotlin.resolve.TopDownAnalysisMode
import org.jetbrains.kotlin.utils.PathUtil
@@ -136,9 +136,16 @@ object DokkaConsoleLogger: DokkaLogger {
}
class DokkaMessageCollector(val logger: DokkaLogger): MessageCollector {
+ private var seenErrors = false
+
override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageLocation) {
+ if (severity == CompilerMessageSeverity.ERROR) {
+ seenErrors = true
+ }
logger.error(MessageRenderer.PLAIN_FULL_PATHS.render(severity, message, location))
}
+
+ override fun hasErrors() = seenErrors
}
class DokkaGenerator(val logger: DokkaLogger,
@@ -242,7 +249,7 @@ fun buildDocumentationModule(injector: Injector,
fun KotlinCoreEnvironment.getJavaSourceFiles(): List<PsiJavaFile> {
- val sourceRoots = configuration.get(CommonConfigurationKeys.CONTENT_ROOTS)
+ val sourceRoots = configuration.get(JVMConfigurationKeys.CONTENT_ROOTS)
?.filterIsInstance<JavaSourceRoot>()
?.map { it.file }
?: listOf()