Remove global artifact history cache in Gradle
Each Kotlin task now writes build history to separate file.
A map of output directories to history files is used to get changes for
modified files.
#KT-22623 fixed
This commit is contained in:
+4
-5
@@ -60,13 +60,13 @@ class IncrementalCompilationOptions(
|
||||
reportSeverity: Int,
|
||||
/** @See [CompilationResultCategory]] */
|
||||
requestedCompilationResults: Array<Int>,
|
||||
val resultDifferenceFile: File? = null,
|
||||
val friendDifferenceFile: File? = null,
|
||||
val usePreciseJavaTracking: Boolean,
|
||||
/**
|
||||
* Directories that should be cleared when IC decides to rebuild
|
||||
*/
|
||||
val localStateDirs: List<File>
|
||||
val localStateDirs: List<File>,
|
||||
val buildHistoryFile: File,
|
||||
val modulesInfo: IncrementalModuleInfo
|
||||
) : CompilationOptions(compilerMode, targetPlatform, reportCategories, reportSeverity, requestedCompilationResults) {
|
||||
companion object {
|
||||
const val serialVersionUID: Long = 0
|
||||
@@ -81,8 +81,7 @@ class IncrementalCompilationOptions(
|
||||
"workingDir=$workingDir, " +
|
||||
"customCacheVersionFileName='$customCacheVersionFileName', " +
|
||||
"customCacheVersion=$customCacheVersion, " +
|
||||
"resultDifferenceFile=$resultDifferenceFile, " +
|
||||
"friendDifferenceFile=$friendDifferenceFile, " +
|
||||
"buildHistoryFile=$buildHistoryFile, " +
|
||||
"usePreciseJavaTracking=$usePreciseJavaTracking" +
|
||||
"localStateDirs=$localStateDirs" +
|
||||
")"
|
||||
|
||||
-11
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.daemon.common
|
||||
|
||||
import java.io.File
|
||||
import java.rmi.RemoteException
|
||||
|
||||
interface IncrementalCompilerServicesFacade : CompilerServicesFacadeBase {
|
||||
@@ -29,14 +28,4 @@ interface IncrementalCompilerServicesFacade : CompilerServicesFacadeBase {
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun revert()
|
||||
|
||||
// ChangesRegistry
|
||||
@Throws(RemoteException::class)
|
||||
fun registerChanges(timestamp: Long, dirtyData: SimpleDirtyData)
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun unknownChanges(timestamp: Long)
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun getChanges(artifact: File, sinceTS: Long): Iterable<SimpleDirtyData>?
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2000-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
|
||||
|
||||
data class IncrementalModuleEntry(
|
||||
private val projectPath: String,
|
||||
val name: String,
|
||||
val buildDir: File,
|
||||
val buildHistoryFile: File
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID = 0L
|
||||
}
|
||||
}
|
||||
|
||||
class IncrementalModuleInfo(
|
||||
val projectRoot: File,
|
||||
val dirToModule: Map<File, IncrementalModuleEntry>,
|
||||
val nameToModules: Map<String, Set<IncrementalModuleEntry>>
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID = 0L
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user