Sort source to output mapping before writing to caches

#KT-32902 Fixed
This commit is contained in:
Alexey Tsvetkov
2019-07-24 14:54:12 +03:00
parent afa10cc125
commit 4b9a852745
2 changed files with 7 additions and 3 deletions
@@ -22,9 +22,11 @@ import org.jetbrains.kotlin.utils.sure
import java.io.File
open class GeneratedFile(
val sourceFiles: Collection<File>,
sourceFiles: Collection<File>,
val outputFile: File
)
) {
val sourceFiles = sourceFiles.sortedBy { it.path }
}
class GeneratedJvmClass (
sourceFiles: Collection<File>,
@@ -635,7 +635,9 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
}
?: representativeTarget
return outputItemCollector.outputs.groupBy(SimpleOutputItem::target, SimpleOutputItem::toGeneratedFile)
return outputItemCollector.outputs
.sortedBy { it.outputFile }
.groupBy(SimpleOutputItem::target, SimpleOutputItem::toGeneratedFile)
}
private fun updateLookupStorage(