Refactoring: extract jar names in PathUtil and use them in artifacts

This commit is contained in:
Nikolay Krasko
2017-11-14 18:39:47 +03:00
parent 3a90f3618a
commit d2aabe076d
4 changed files with 58 additions and 33 deletions
@@ -51,7 +51,7 @@ fun File.matchMaybeVersionedFile(baseName: String) =
name == baseName.removeSuffix(".jar") || // for classes dirs
Regex(Regex.escape(baseName.removeSuffix(".jar")) + "(-\\d.*)?\\.jar").matches(name)
private const val KOTLIN_COMPILER_EMBEDDABLE_JAR = "${PathUtil.KOTLIN_COMPILER}-embeddable.jar"
private const val KOTLIN_COMPILER_EMBEDDABLE_JAR = "${PathUtil.KOTLIN_COMPILER_NAME}-embeddable.jar"
internal fun List<File>.takeIfContainsAll(vararg keyNames: String): List<File>? =
takeIf { classpath ->