Build: Sort idea files in ivy repository to stabilize order

Sort by lowercase name, otherwise order may be different on win
This commit is contained in:
Vyacheslav Gerasimov
2020-03-06 01:22:52 +03:00
parent da0eeb0c28
commit 35dc57d674
+13 -10
View File
@@ -402,16 +402,19 @@ fun writeIvyXml(
} }
element("publications") { element("publications") {
artifactDir.listFiles()?.filter(::shouldIncludeIntellijJar)?.forEach { jarFile -> artifactDir.listFiles()
val relativeName = jarFile.toRelativeString(baseDir).removeSuffix(".jar") ?.filter(::shouldIncludeIntellijJar)
emptyElement("artifact") { ?.sortedBy { it.name.toLowerCase() }
attributes( ?.forEach { jarFile ->
"name" to relativeName, val relativeName = jarFile.toRelativeString(baseDir).removeSuffix(".jar")
"type" to "jar", emptyElement("artifact") {
"ext" to "jar", attributes(
"conf" to "default" "name" to relativeName,
) "type" to "jar",
} "ext" to "jar",
"conf" to "default"
)
}
} }
sourcesJar.forEach { jarFile -> sourcesJar.forEach { jarFile ->