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, ".", "") } } }