From 182c1cee0546eac49621aad355be5570719e5c09 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Tue, 10 Mar 2020 21:20:02 +0700 Subject: [PATCH] [Commonizer] Don't regenerate commonized KLIBs for *-SNAPSHOT versions --- .../targets/native/internal/KotlinNativeKlibCommonizer.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/KotlinNativeKlibCommonizer.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/KotlinNativeKlibCommonizer.kt index 31aa02d5eef..905628b6055 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/KotlinNativeKlibCommonizer.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/KotlinNativeKlibCommonizer.kt @@ -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()