From 23645dea67da464294b5b63e65b3ff82f966c85e Mon Sep 17 00:00:00 2001 From: Jeromy Cannon Date: Fri, 20 Oct 2023 18:00:28 +0100 Subject: [PATCH] removed dead code Signed-off-by: Jeromy Cannon --- .../plugin/kind/release/KindArtifactTask.kt | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/fullstack-gradle-plugin/src/main/java/com/hedera/fullstack/gradle/plugin/kind/release/KindArtifactTask.kt b/fullstack-gradle-plugin/src/main/java/com/hedera/fullstack/gradle/plugin/kind/release/KindArtifactTask.kt index 4a778b9c2..d63564818 100644 --- a/fullstack-gradle-plugin/src/main/java/com/hedera/fullstack/gradle/plugin/kind/release/KindArtifactTask.kt +++ b/fullstack-gradle-plugin/src/main/java/com/hedera/fullstack/gradle/plugin/kind/release/KindArtifactTask.kt @@ -36,7 +36,6 @@ abstract class KindArtifactTask() : DefaultTask() { companion object { const val KIND_RELEASE_URL_TEMPLATE = "https://kind.sigs.k8s.io/dl/v%s/kind-%s-%s" - const val KIND_ARTIFACT_TEMPLATE = "kind-%s-%s" const val KIND_EXECUTABLE_PREFIX = "kind" const val KIND_VERSION_FILE = "KIND_VERSION" } @@ -58,6 +57,8 @@ abstract class KindArtifactTask() : DefaultTask() { download(tuple) } + project.logger.log(LogLevel.WARN, "Kind download output directory ${output.get().asFile.toPath()}") + writeVersionFile(output.get().asFile.toPath()) } @@ -96,15 +97,6 @@ abstract class KindArtifactTask() : DefaultTask() { } } - private fun createSubDirectory(subDirectory: String) { - try { - workingDirectory = workingDirectory!!.resolve(subDirectory) - workingDirectory!!.toFile().deleteOnExit() - } catch (e: Exception) { - throw StopExecutionException("Unable to create working sub-directory, full path: $workingDirectory") - } - } - private fun download(tuple: ArtifactTuple) { val downloadUrl = String.format( KIND_RELEASE_URL_TEMPLATE, @@ -112,11 +104,6 @@ abstract class KindArtifactTask() : DefaultTask() { tuple.operatingSystem.descriptor, tuple.architecture.descriptor ) - val artifactName = String.format( - KIND_ARTIFACT_TEMPLATE, - tuple.operatingSystem.descriptor, - tuple.architecture.descriptor - ) val tempFile = workingDirectory!!.resolve(KIND_EXECUTABLE_PREFIX + tuple.operatingSystem.fileExtension) @@ -148,7 +135,7 @@ abstract class KindArtifactTask() : DefaultTask() { } try { - project.logger.log(LogLevel.WARN, "Copying ${source} to ${destination}") + project.logger.log(LogLevel.DEBUG, "Copying ${source} to ${destination}") project.copy { from(source) into(destination)