From 2e2444c2bcdc25808c44eb7f14cc1dcfbcfd1293 Mon Sep 17 00:00:00 2001 From: Marcus Fihlon Date: Mon, 6 Nov 2017 19:49:28 +0100 Subject: [PATCH 1/2] :ok_hand: Code review change Thanks to @ethauvin for his very good hint! --- .../src/main/kotlin/com/beust/kobalt/archive/Archives.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt index 3d685865..5334e09f 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt @@ -18,7 +18,7 @@ class Archives { const val JAR_NAME_WITH_MAIN_CLASS = "jarNameWithMainClass" fun defaultArchiveName(project: Project) = project.name + - if (project.version == null || project.version == "") "" else "-${project.version}" + if (project.version.isNullOrBlank()) "" else "-${project.version}" fun generateArchive(project: Project, context: KobaltContext, From f4f3827fd1a0c6a73b398b35832d0efbd95fa834 Mon Sep 17 00:00:00 2001 From: Marcus Fihlon Date: Mon, 6 Nov 2017 19:54:54 +0100 Subject: [PATCH 2/2] :speech_balloon: Adding trimming of line in format string Before: ***** WARNING Old profile syntax detected for " val debug = false", please update to "val debug by profile()" After: ***** WARNING Old profile syntax detected for "val debug = false", please update to "val debug by profile() --- src/main/kotlin/com/beust/kobalt/app/Profiles.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/Profiles.kt b/src/main/kotlin/com/beust/kobalt/app/Profiles.kt index bb5ea346..b2cf1a5a 100644 --- a/src/main/kotlin/com/beust/kobalt/app/Profiles.kt +++ b/src/main/kotlin/com/beust/kobalt/app/Profiles.kt @@ -56,7 +56,7 @@ class Profiles(val context: KobaltContext) { val variable = if (match.first) match.second else oldMatch.second if (oldMatch.first) { - warn("Old profile syntax detected for \"$line\"," + + warn("Old profile syntax detected for \"${line.trim()}\"," + " please update to \"val $variable by profile()\"") }