Skip to content

Commit

Permalink
fix errors with project name in ProjectWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
teixeira0x committed Aug 27, 2024
1 parent 7634a14 commit c4938ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/kotlin/com/teixeira/gdx/writer/ProjectWriter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream

class ProjectWriter(
val name: String,
val projectName: String,
val packageName: String,
val minSdk: String,
val targetSdk: String,
Expand All @@ -18,7 +18,7 @@ class ProjectWriter(
}

fun write(sendMessage: (message: String) -> Unit) {
val projectDir = File(ANDROIDIDEPROJECTS, name)
val projectDir = File(ANDROIDIDEPROJECTS, projectName)

if (projectDir.exists()) {
sendMessage("There is already a project with this name!")
Expand Down Expand Up @@ -63,7 +63,7 @@ class ProjectWriter(

file.writeText(
content
.replace("\$project_name", name)
.replace("\$project_name", projectName)
.replace("\$package_name", packageName)
.replace("\$minSdk", minSdk)
.replace("\$targetSdk", targetSdk),
Expand Down

0 comments on commit c4938ab

Please sign in to comment.