From 7b82668a6b40c7d10a1988579cb77836c7481415 Mon Sep 17 00:00:00 2001 From: Esoteric Slime <90862990+EsotericSlime@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:09:11 +0100 Subject: [PATCH] Use `projectGroupString` variable --- build.gradle.kts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 210d1f33..9d5c012f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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" @@ -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))