Minor: move compile iteration result to daemon common
The class is used on both server and client, but it was defined in server module. Gradle plugin worked, because all classes are present in kotlin compiler embeddable, but the code was red in IDE (which is correct because Gradle plugin does not depend on daemon server module).
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.daemon.common
|
||||
|
||||
import java.io.File
|
||||
import java.io.Serializable
|
||||
|
||||
class CompileIterationResult(
|
||||
@Suppress("unused") // used in Gradle
|
||||
val sourceFiles: Iterable<File>,
|
||||
@Suppress("unused") // used in Gradle
|
||||
val exitCode: String
|
||||
) : Serializable {
|
||||
companion object {
|
||||
const val serialVersionUID: Long = 0
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,6 @@ import org.jetbrains.kotlin.cli.common.ExitCode
|
||||
import org.jetbrains.kotlin.daemon.common.*
|
||||
import org.jetbrains.kotlin.incremental.ICReporter
|
||||
import java.io.File
|
||||
import java.io.Serializable
|
||||
|
||||
internal class RemoteICReporter(
|
||||
private val servicesFacade: CompilerServicesFacadeBase,
|
||||
@@ -39,18 +38,10 @@ internal class RemoteICReporter(
|
||||
|
||||
override fun reportCompileIteration(sourceFiles: Collection<File>, exitCode: ExitCode) {
|
||||
if (shouldReportCompileIteration) {
|
||||
compilationResults.add(CompilationResultCategory.IC_COMPILE_ITERATION.code, CompileIterationResult(sourceFiles, exitCode.toString()))
|
||||
compilationResults.add(CompilationResultCategory.IC_COMPILE_ITERATION.code,
|
||||
CompileIterationResult(sourceFiles, exitCode.toString())
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CompileIterationResult(
|
||||
@Suppress("unused") // used in Gradle
|
||||
val sourceFiles: Iterable<File>,
|
||||
@Suppress("unused") // used in Gradle
|
||||
val exitCode: String
|
||||
) : Serializable {
|
||||
companion object {
|
||||
const val serialVersionUID: Long = 0
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import org.jetbrains.kotlin.daemon.common.CompilationResultCategory
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResults
|
||||
import org.jetbrains.kotlin.daemon.common.LoopbackNetworkInterface
|
||||
import org.jetbrains.kotlin.daemon.common.SOCKET_ANY_FREE_PORT
|
||||
import org.jetbrains.kotlin.daemon.report.CompileIterationResult
|
||||
import org.jetbrains.kotlin.daemon.common.CompileIterationResult
|
||||
import org.jetbrains.kotlin.gradle.plugin.kotlinDebug
|
||||
import org.jetbrains.kotlin.gradle.utils.pathsAsStringRelativeTo
|
||||
import java.io.Serializable
|
||||
|
||||
Reference in New Issue
Block a user