Skip to content

Commit 8daeab8

Browse files
committed
Force a .gitignore in the build folder, People need to STOP ADDING THESE TO THERE GIT REPOS! It's a TEMP folder!
1 parent b62b411 commit 8daeab8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public void applyPlugin()
8787
this.applyExternalPlugin("eclipse");
8888
this.applyExternalPlugin("idea");
8989

90+
addGitIgnore(); //Morons -.-
91+
9092
configureDeps();
9193
configureCompilation();
9294
configureEclipse();
@@ -862,4 +864,18 @@ private DelayedFile df(String file, String... alts)
862864
{
863865
return delayedFile(file, alts);
864866
}
867+
868+
private void addGitIgnore()
869+
{
870+
File git = new File(project.getBuildDir(), ".gitignore");
871+
if (!git.exists())
872+
{
873+
git.mkdir();
874+
try
875+
{
876+
Files.write("#Seriously guys, stop commiting this to your git repo!\r\n*".getBytes(), git);
877+
}
878+
catch (IOException e){}
879+
}
880+
}
865881
}

0 commit comments

Comments
 (0)