Minor: rename CompilationResult->CompilationResultCategory
This commit is contained in:
+2
-2
@@ -22,9 +22,9 @@ import java.rmi.RemoteException
|
||||
|
||||
interface CompilationResultsStorage : Remote {
|
||||
@Throws(RemoteException::class)
|
||||
fun store(compilationResult: Int, value: Serializable)
|
||||
fun store(compilationResultCategory: Int, value: Serializable)
|
||||
}
|
||||
|
||||
enum class CompilationResult(val code: Int) {
|
||||
enum class CompilationResultCategory(val code: Int) {
|
||||
IC_COMPILE_ITERATION(0)
|
||||
}
|
||||
@@ -29,7 +29,7 @@ internal class RemoteICReporter(
|
||||
) : ICReporter {
|
||||
private val shouldReportMessages = ReportCategory.IC_MESSAGE.code in compilationOptions.reportCategories
|
||||
private val isVerbose = compilationOptions.reportSeverity == ReportSeverity.DEBUG.code
|
||||
private val shouldReportCompileIteration = CompilationResult.IC_COMPILE_ITERATION.code in compilationOptions.requestedCompilationResults
|
||||
private val shouldReportCompileIteration = CompilationResultCategory.IC_COMPILE_ITERATION.code in compilationOptions.requestedCompilationResults
|
||||
|
||||
override fun report(message: () -> String) {
|
||||
if (shouldReportMessages && isVerbose) {
|
||||
@@ -39,7 +39,7 @@ internal class RemoteICReporter(
|
||||
|
||||
override fun reportCompileIteration(sourceFiles: Collection<File>, exitCode: ExitCode) {
|
||||
if (shouldReportCompileIteration) {
|
||||
compilationResultsStorage.store(CompilationResult.IC_COMPILE_ITERATION.code, CompileIterationResult(sourceFiles, exitCode.toString()))
|
||||
compilationResultsStorage.store(CompilationResultCategory.IC_COMPILE_ITERATION.code, CompileIterationResult(sourceFiles, exitCode.toString()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.jetbrains.kotlin.compilerRunner
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResult
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResultCategory
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResultsStorage
|
||||
import org.jetbrains.kotlin.daemon.common.SOCKET_ANY_FREE_PORT
|
||||
import org.jetbrains.kotlin.daemon.report.CompileIterationResult
|
||||
@@ -16,8 +16,8 @@ internal class GradleCompilationResultsStorage(project: Project): CompilationRes
|
||||
private val projectRootFile = project.rootProject.projectDir
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
override fun store(compilationResult: Int, value: Serializable) {
|
||||
if (compilationResult == CompilationResult.IC_COMPILE_ITERATION.code) {
|
||||
override fun store(compilationResultCategory: Int, value: Serializable) {
|
||||
if (compilationResultCategory == CompilationResultCategory.IC_COMPILE_ITERATION.code) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val compileIterationResult = value as? CompileIterationResult
|
||||
if (compileIterationResult != null) {
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2MetadataCompilerArguments
|
||||
import org.jetbrains.kotlin.config.Services
|
||||
import org.jetbrains.kotlin.daemon.common.*
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResult
|
||||
import org.jetbrains.kotlin.daemon.common.CompilationResultCategory
|
||||
import org.jetbrains.kotlin.gradle.plugin.ParentLastURLClassLoader
|
||||
import org.jetbrains.kotlin.gradle.plugin.kotlinDebug
|
||||
import org.jetbrains.kotlin.incremental.*
|
||||
@@ -196,7 +196,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
||||
customCacheVersionFileName = GRADLE_CACHE_VERSION_FILE_NAME,
|
||||
reportCategories = reportCategories(verbose),
|
||||
reportSeverity = reportSeverity(verbose),
|
||||
requestedCompilationResults = arrayOf(CompilationResult.IC_COMPILE_ITERATION.code),
|
||||
requestedCompilationResults = arrayOf(CompilationResultCategory.IC_COMPILE_ITERATION.code),
|
||||
compilerMode = CompilerMode.INCREMENTAL_COMPILER,
|
||||
targetPlatform = CompileService.TargetPlatform.JVM
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user