From aeb80e4f99db4bd56bbeb762f794b35fbc4eb07e Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Tue, 22 Dec 2020 16:16:19 +0100 Subject: [PATCH] fix build --- common/src/main/kotlin/flank.common/Archive.kt | 6 ------ common/src/main/kotlin/flank.common/Strings.kt | 1 - common/src/main/kotlin/flank.common/Zip.kt | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/common/src/main/kotlin/flank.common/Archive.kt b/common/src/main/kotlin/flank.common/Archive.kt index d42f101527..b6a565d1bf 100644 --- a/common/src/main/kotlin/flank.common/Archive.kt +++ b/common/src/main/kotlin/flank.common/Archive.kt @@ -4,12 +4,6 @@ import org.rauschig.jarchivelib.ArchiveFormat import org.rauschig.jarchivelib.ArchiverFactory import org.rauschig.jarchivelib.CompressionType import java.io.File -import java.io.FileInputStream -import java.io.InputStream -import java.util.zip.ZipEntry -import java.util.zip.ZipFile -import java.util.zip.ZipOutputStream - fun File.extract( destination: File, diff --git a/common/src/main/kotlin/flank.common/Strings.kt b/common/src/main/kotlin/flank.common/Strings.kt index 40a0bd43ea..90359f4339 100644 --- a/common/src/main/kotlin/flank.common/Strings.kt +++ b/common/src/main/kotlin/flank.common/Strings.kt @@ -11,7 +11,6 @@ fun String.normalizeLineEnding(): String { return this.replace("\r\n", "\n") } - fun String.trimStartLine(): String { return this.split("\n").drop(1).joinToString("\n") } diff --git a/common/src/main/kotlin/flank.common/Zip.kt b/common/src/main/kotlin/flank.common/Zip.kt index 1a6bcec68d..7c7c7d33e4 100644 --- a/common/src/main/kotlin/flank.common/Zip.kt +++ b/common/src/main/kotlin/flank.common/Zip.kt @@ -7,7 +7,6 @@ import java.util.zip.ZipEntry import java.util.zip.ZipFile import java.util.zip.ZipOutputStream - fun unzipFile(zipFileName: File, unzipPath: String): List { println("Unzipping: ${zipFileName.absolutePath} to $unzipPath") return ZipFile(zipFileName).unzipTo(unzipPath) @@ -23,7 +22,7 @@ private fun ZipFile.unzipTo(unzipPath: String) = use { zipFile -> private fun ZipEntry.saveToFile(zipFile: ZipFile, unzipPath: String): File { val outputFile = File(unzipPath, name) - if(isDirectory) { + if (isDirectory) { outputFile.mkdirs() } else { zipFile.getInputStream(this).use { zipEntryInput -> zipEntryInput.toFile(outputFile) }