[Commonizer] Don't regenerate commonized KLIBs for *-SNAPSHOT versions

This commit is contained in:
Dmitriy Dolovov
2020-03-10 21:20:02 +07:00
parent d032f9b9cc
commit 182c1cee05
@@ -32,11 +32,6 @@ internal fun runCommonizerInBulk(
// no need to commonize, just use the libraries from the distribution
distributionDir.resolve(KONAN_DISTRIBUTION_KLIB_DIR)
} else {
// naive up-to-date check:
// "X.Y.Z-SNAPSHOT" is not enough to uniquely identify the concrete version of Kotlin plugin,
// therefore lets assume that it's always not up to date
val definitelyNotUpToDate = kotlinVersion.endsWith("SNAPSHOT", ignoreCase = true)
// need stable order of targets for consistency
val orderedTargets = targets.sortedBy { it.name }
@@ -47,7 +42,7 @@ internal fun runCommonizerInBulk(
}
val destinationDir = baseDestinationDir.resolve(discriminator)
if (definitelyNotUpToDate || !destinationDir.isDirectory) {
if (!destinationDir.isDirectory) {
val parentDir = destinationDir.parentFile
parentDir.mkdirs()