KSCM: temporary workaround gradle returning results in unstable order

This commit is contained in:
Pavel V. Talanov
2017-06-14 18:42:00 +03:00
parent fb0e0e3767
commit 3c511f3f40
@@ -287,8 +287,10 @@ private class ClearableLazyValue<out T : Any>(private val lock: ReentrantReadWri
}
}
// TODO: relying on this to compare dependencies seems wrong, doesn't take javaHome and other stuff into account
private fun KotlinScriptExternalDependencies.match(other: KotlinScriptExternalDependencies)
= classpath.isSamePathListAs(other.classpath) && sources.isSamePathListAs(other.sources)
= classpath.isSamePathListAs(other.classpath) &&
sources.toSet().isSamePathListAs(other.sources.toSet()) // TODO: gradle returns stdlib and reflect sources in unstable order for some reason
private fun Iterable<File>.isSamePathListAs(other: Iterable<File>): Boolean =