From 7828befc3c441dc32700f29005ca8cf3a3710bc5 Mon Sep 17 00:00:00 2001 From: Yang Bo Date: Tue, 11 Jun 2019 21:15:32 -0700 Subject: [PATCH] Separate path element with a dot instead of dash --- .../SubdirectoryOrganization.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/{ => subdirectoryOrganization}/SubdirectoryOrganization.scala (72%) diff --git a/subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/SubdirectoryOrganization.scala b/subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/subdirectoryOrganization/SubdirectoryOrganization.scala similarity index 72% rename from subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/SubdirectoryOrganization.scala rename to subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/subdirectoryOrganization/SubdirectoryOrganization.scala index df14202..ac1ef1f 100644 --- a/subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/SubdirectoryOrganization.scala +++ b/subdirectory-organization/src/main/scala/com/thoughtworks/sbtBestPractice/subdirectoryOrganization/SubdirectoryOrganization.scala @@ -1,5 +1,6 @@ -package com.thoughtworks.sbtBestPractice -import sbt.Keys._ +package com.thoughtworks.sbtBestPractice.subdirectoryOrganization + +import sbt.Keys.{baseDirectory, organization} import sbt._ /** @@ -19,7 +20,7 @@ object SubdirectoryOrganization extends AutoPlugin { case null => organization.value case parent => - s"${organization.value}.${Project.normalizeModuleID(parent.replace('/', '.'))}" + parent.split('/').map(Project.normalizeModuleID).mkString(organization.value, ".", "") } } }