Skip to content

Commit

Permalink
Use projectGroupString variable
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Sep 10, 2024
1 parent 24cdc28 commit 7b82668
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ tasks.register("renameProject") {
val buildFilePath = projectDir.resolve("build.gradle.kts").toString()
val javaSourcePath = projectDir.resolve(startPath)

val currentGroupString = project.group.toString()
val currentGroupPath = currentGroupString.replace(groupStringSeparator, File.separator)
val currentGroupPath = projectGroupString.replace(groupStringSeparator, File.separator)

val currentMainClassName = pascalcase(rootProject.name)
val currentMainClassFileName = "$currentMainClassName.java"
Expand All @@ -154,7 +153,7 @@ tasks.register("renameProject") {
error("Failed to rename main file from ${oldMainClassFilePath.absolutePath} to ${newMainClassFilePath.absolutePath}")
}

replaceStringInDirectoryFiles(javaSourcePath, currentGroupString, newGroupString)
replaceStringInDirectoryFiles(javaSourcePath, projectGroupString, newGroupString)
replaceStringInDirectoryFiles(javaSourcePath, currentMainClassName, newMainClassName)

replaceStringInFile(settingsFilePath, rootProject.name, kebabcase(newName))
Expand Down

0 comments on commit 7b82668

Please sign in to comment.