Jump to content

Forge repo etiquette


cad97

Recommended Posts

I've recently switched over to the "proper" setup for Forge using gradle. What files should I commit to the mod repository and which should I .gitignore?

 

(Basically, which files are critical to the mod download from repo and which can I rely on gradle to rebuild for the downloadee?)

 

(I should mention I'm in the `gradlew idea` workspace)

 

My current .gitignore:

.gradle/
build/
gradle/
build.gradle
gradlew.bat
*.iml
*.ipr
*.iws
run/

 

The folder hierarchy I'm working with:

.git
|	<git stuff>
.gradle
|	<gradle stuff>
build
|	<build stuff>
run
|	<run environment>
src
|	<class files>
.gitignore
build.gradle
gradlew.bat
README.md
<project>.iml
<project>.ipr
<project>.iws
[code]

Link to comment
Share on other sites

I use the following .gitignore:

 

# push src/ only
*
!src/
!gradle/
!gradlew
!gradlew.bat
!README.md
!LICENSE
!build.gradle

*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

 

All one needs to build is the "gradle/" and the "src/" directory aswell as the "gradlew" and "gradlew.bat" and the "build.gradle" file. This explains the .gitignore file:

First I ignore all files, then I unignore all files mentioned above. The other ignores are default from GitHub.

Link to comment
Share on other sites

jabelar you should put the gradle wrapper into your repo, that's the whole point of the wrapper.

 

Sure, it wouldn't hurt.  The thing is for me I use the repo mostly for private backup and tutorial examples, so I mostly care about the code and I don't usually collaborate.  If I clone I likely still install a new Forge over top, and just preserve the source.  I don't usually edit the wrapper in a unique way, so am not worried about re-creating it as needed.  But still good idea for proper posterity.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Thanks, diesieben, for clarifying, and jabelar and WorldsEnder for posting their .gitignores. I've got what I need now, thanks!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.