Skip to content

Commit

Permalink
Small package name issue fix that could happen in certain package str…
Browse files Browse the repository at this point in the history
…uctures.
  • Loading branch information
Rafael Costa committed Dec 29, 2021
1 parent 108f90f commit 735fdd6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ class CodeGenerator(
currentCommonPackageName = currentCommonPackageName.commonPrefixWith(packageName)
}

if (!currentCommonPackageName.endsWith(".")) {
currentCommonPackageName = currentCommonPackageName.split(".")
.dropLast(1)
.joinToString(".")
}

return currentCommonPackageName.removeSuffix(".")
}
}

0 comments on commit 735fdd6

Please sign in to comment.