GP-6679: Fixing .gitignore not making its way from Skeleton to new

GhidraDev module project
This commit is contained in:
Ryan Kurtz
2026-04-08 11:16:43 -04:00
parent f4569c4652
commit ef8deea66c
4 changed files with 8 additions and 2 deletions

View File

@@ -32,7 +32,8 @@ change with future releases.
## Change History
__5.1.0:__
* Added a PyGhidra Headless run configuration
* Added a PyGhidra Headless run configuration.
* New Ghidra module projects now contain a default .gitignore file (requires Ghidra 12.2 or later).
__5.0.1:__
* Fixed a bug that prevented Ghidra from discovering the Ghidra module project when launched with

View File

@@ -173,6 +173,11 @@ public class GhidraModuleUtils {
if (!buildTemplateGradleFile.renameTo(buildGradleFile)) {
throw new IOException("Failed to rename: " + buildTemplateGradleFile);
}
File gitIgnoreFile = new File(projectDir, "gitignore");
File dotGitIgnoreFile = new File(projectDir, ".gitignore");
if (gitIgnoreFile.exists() && !gitIgnoreFile.renameTo(dotGitIgnoreFile)) {
throw new IOException("Failed to rename: " + gitIgnoreFile);
}
}
catch (CancelledException | IOException e) {
throw new IOException("Failed to copy skeleton directory: " + projectDir);

View File

@@ -36,7 +36,6 @@ rootProject.assembleDistribution {
exclude '.classpath'
exclude '.project'
exclude 'build.gradle'
rename "gitignore", ".gitignore"
into "Extensions/Ghidra/Skeleton"
}
}

View File

@@ -1,5 +1,6 @@
.project
.pyproject
.pydevproject
.classpath
.settings/
.gradle/