Jump to content

Can I automate versioning?


riderj

Recommended Posts

Do I have to change the build.gradle file every time to reflect the version change? If so what's the point of the @Mod annotation? I'm still new at modding minecraft using forge, so please give me some slack.

 

 

Side Question: Why is the recommended build, 1.6.4-Recommended 9.11.1.965 1.6.4, not ForgeGradle? Though .964 is :o

Link to comment
Share on other sites

Because 965 was a build to fix some problems with 953. Gradle builds also do not have the Modloader compatibility layer.

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

Link to comment
Share on other sites

No.

 

And for the main topic: I don't know how it's done, but there is a way to put the version into your @mod from the build.gradle.

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

Link to comment
Share on other sites

You can have "auto versioning".

I believe that is what the default build.gradle shipped with Forge tries to do with the mcmod.info:

processResources
{
    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod/info'
                
        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }

 

So you can replace the values in files on building with

expand

. Or use an Ant Filter.

And you can set a property value with

gradle build -Pversion=NewVersion

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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