Fix clearing IC caches on rebuild

Previously IC caches in Gradle were not cleared correctly on rebuild,
because only `clean` method was called, but `flush` and `close`
were not.
This commit is contained in:
Alexey Tsvetkov
2019-01-17 22:52:25 +03:00
parent 7dcdba7e1a
commit 9176f9b254
18 changed files with 166 additions and 98 deletions
@@ -46,25 +46,25 @@ open class CompilationOptions(
}
class IncrementalCompilationOptions(
val areFileChangesKnown: Boolean,
val modifiedFiles: List<File>?,
val deletedFiles: List<File>?,
val workingDir: File,
compilerMode: CompilerMode,
targetPlatform: CompileService.TargetPlatform,
/** @See [ReportCategory] */
val areFileChangesKnown: Boolean,
val modifiedFiles: List<File>?,
val deletedFiles: List<File>?,
val workingDir: File,
compilerMode: CompilerMode,
targetPlatform: CompileService.TargetPlatform,
/** @See [ReportCategory] */
reportCategories: Array<Int>,
/** @See [ReportSeverity] */
/** @See [ReportSeverity] */
reportSeverity: Int,
/** @See [CompilationResultCategory]] */
/** @See [CompilationResultCategory]] */
requestedCompilationResults: Array<Int>,
val usePreciseJavaTracking: Boolean,
/**
val usePreciseJavaTracking: Boolean,
/**
* Directories that should be cleared when IC decides to rebuild
*/
val localStateDirs: List<File>,
val multiModuleICSettings: MultiModuleICSettings,
val modulesInfo: IncrementalModuleInfo
val outputFiles: List<File>,
val multiModuleICSettings: MultiModuleICSettings,
val modulesInfo: IncrementalModuleInfo
) : CompilationOptions(compilerMode, targetPlatform, reportCategories, reportSeverity, requestedCompilationResults) {
companion object {
const val serialVersionUID: Long = 0
@@ -79,7 +79,7 @@ class IncrementalCompilationOptions(
"workingDir=$workingDir, " +
"multiModuleICSettings=$multiModuleICSettings, " +
"usePreciseJavaTracking=$usePreciseJavaTracking" +
"localStateDirs=$localStateDirs" +
"outputFiles=$outputFiles" +
")"
}
}