Skip to content

Commit

Permalink
Replace project name in gradle settings
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Sep 8, 2024
1 parent 99c176f commit ff80158
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/rename-project.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { readFileSync, writeFileSync } from "fs";

const commandLineArguments = process.argv.slice(2);

/**
Expand All @@ -19,3 +21,13 @@ if (!newProjectName) {
console.error("Learn about kebab-case: https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case");
process.exit(1);
}

// Constants
const oldProjectName = "template-paper-plugin";

// File paths
const gradleSettingsFilePath = "settings.gradle.kts"

// Replace project name in the gradle settings
const gradleSettingsFileContent = readFileSync(gradleSettingsFilePath).toString();
writeFileSync(gradleSettingsFilePath, gradleSettingsFileContent.replace(oldProjectName, newProjectName));

0 comments on commit ff80158

Please sign in to comment.