Jump to content

Recommended Posts

Posted

Hey there, because I use 2 entirely different versions of forge this has never been an issue.

But now that I've released my 1.8 version there's things I want to add, but not as a part of the main mod.

 

Mods like TE, Mekanism, Growthcraft, etc. all have addons that require a base mod.

What is the proper way to have multiple mods and addons in a single forge copy

but only build them one at a time and be dependent?

 

I've tried fooling with the package structure and such, and even tried it the way I'd do this task in C# (VS)

but it all builds together.

a.k.a. Sirius

width=400 height=82http://i.imgur.com/QRtYi6e.png[/img]

Posted

I am also interested in this.  I know Reika has a gradle.build file that does it for him (I've got a copy, but I can't decipher it in order to use it).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I am also interested in this.  I know Reika has a gradle.build file that does it for him (I've got a copy, but I can't decipher it in order to use it).

 

http://goo.gl/TSNMvo

It seems to be that bottom half that matters, directing gradle to build 3 separate libraries that all depend on 1 of them.

I've never played with the build file and didn't get it enough when I first looked at it when I began modding, but I'd really like

to be able to release the next couple of batches of stuff for my mod in parts rather than have another 5-10 config file options

the average user probably doesn't look at anyway. lol

a.k.a. Sirius

width=400 height=82http://i.imgur.com/QRtYi6e.png[/img]

Posted

I'll have to mess around with it when I get a chance.  I haven't even looked at my code in three days.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

This is an excellent question, and it is one of those things that some people seem to just magically know how to do... for example, I had no idea that /src/api/java/ was a special folder (it didn't even exist). I suppose it's a feature of Gradle to link those files automatically?

 

Then there's all sorts of magic that is evidently possible with build.gradle, but there are probably whole books devoted to that subject - the online documentation certainly isn't a quick read.

 

For us non-Gradle experts, it would be really nice to have a 'Gradle for Modders' information page, somewhere we can quickly learn about the most common modding-related tasks so we don't all have to become experts in Gradle and can focus instead on adding content to our mods.

Posted

Ha, Finally its my time to shine!

 

I did this a while ago to try out the submod system. I will post some step by step instructions in a few hours.

However, when I wrote them I never intended to share them and I never really tried if everything works (looks like it does, though)

Here could be your advertisement!

Posted

Couple things.

 

To do a task, run "gradlew [name of task]" e.g. "gradlew fullBuild"

 

You can define variables in the build.gradle file like so:

 

def libVersion = "1.3.0"
def oresVersion = "0.3.0"
def hazardsVersion = "0.2.0"
def wildlifeVersion = "0.2.0"

 

There's supposedly a way to wrap those in the build's extended properties, eg.

ext {
   mySpecialProperty = "1234"
}

But I can't seem to reference it properly (that part is fine, the reference throws a build error) per section 13.5.2.

 

I'm also getting a build failure doing the

releaseJars

task, which is responsible for renaming the zip files as jar files ("file is in use by another process") but the file is renamed correctly (as well as every other step completing successfully).  Here's the debug output:

 

12:07:25.447 [iNFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :releaseJars (Thread[main,5,main]) started.
12:07:25.454 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :releaseJars
12:07:25.454 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
                                     Starting to execute task ':releaseJars'
12:07:25.471 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter]
                                     Determining if task ':releaseJars' is up-to-date
12:07:31.718 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
                                     Finished executing task ':releaseJars'
12:07:31.737 [iNFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :releaseJars (Thread[main,5,main]) completed. Took 6.283 secs.
12:07:31.753 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 36.296 secs, idle: 0.289 secs
12:07:31.784 [ERROR] [org.gradle.BuildExceptionReporter]
12:07:31.800 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.

 

Lastly don't forget to include/exclude your assets folder(s) as needed in the from zipTree(...) section:

 

exclude 'assets/**'
include 'assets/submod1/**'
include 'assets/submod2**'
etc

 

Anyway, here's my build.gradle

http://pastebin.com/hVGQqPcr

Note that I have a few include/exclude listing based on my setup which is not exactly ideal.  I was simply taking the path of least resistance (adding the extra include/exclude line rather than moving things to new folders and having the build file move them back to where they're needed).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

As a side note, I set up bat files to run the build commands for me, rather than using a command line (where I have to copy-paste the folder directory before I can do anything).

 

gradlew fullBuild
pause

 

The 'pause' should hold the window open (until you press any key) but I've had mixed results.  If it doesn't work, do this instead:

start /wait  fullBuild

 

It'll create a second command window, but it'll be forced to stay open after the process completes.  Either close it or type "exit"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Or I can double-click a batch file.  I type the command once, and bam!

width=571 height=464http://imgs.xkcd.com/comics/is_it_worth_the_time.png[/img]

I save 5 seconds, I do it about once a week, and it took me less than 21 minutes to write.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: This seems to be happening every time I leave the Beneath dimension (2 for 2). Not sure why those 2 dimensions specifically. I have no problems with the nether or Twilight Forest.
    • I was exploring my world that is hosted on a server and when I go to a certain place that is not yet loaded on the map I get disconnected and the server closes. Could you help me, since I don't know what is causing this? crashlog https://gist.github.com/Dwolfwoood/89438cd77dd8796a6dfa6783c20adaed   log server https://gist.github.com/Dwolfwoood/2aa08cc2c554098c7833b2a02f70e6e6
    • I can launch the game, but whenever I try to get in my server I get the error: java.lang.indexoutofboundsexception: readerIndex(5) + length(8) exceeds writerIndex(9): PooledUnsafeByteBuf(ridx: 5, widx: 9, cap: 9)    I don't really know what's going on. https://pastebin.com/ujr0sRDZ I put the whole log in the Pastebin link.
    • I recently built a mod pack ,RLMCC Insanity Unfolds, and Ive been playing it to make sure its stable and playable, these last few days the game has been running fine with the exception of a few player loading quirks here and there but nothing game breaking, fast forward to this morning attempting to load into my survival world results in the game crashing, I will reach 100% on world loading, the joining game prompt will appear, the loading terrain prompt will appear, I get a large lag spike, and then the game says Saving world and then crashes throwing an unknown error in the launcher when checking the logs I can see that right before the world gets shut down better combat throws a fatal error, I had assumed at first that maybe when the world got shutdown last that something got stuck in an invalid state so I removed the mod and played for a bit to hopefully un-stick whatever it was, no luck there. When I placed the mod back into the game the world continued to crash the game when loading in. I figured that maybe there was a bug introduced in the latest version so I downgraded a couple versions and worked my way back up. The original version of Better Combat the mod pack was using was better combat 1.8.6 - 1.20.1, I tried better combat 1.8.1 - 1.20.1 and worked my way up to version 1.8.5 - 1.20.1, still running into the problem. Removing Better combat solves the problem but removing the mod renders a major part of my mod pack broken as one of the major aspects of the pack was focused around better combat. As mentioned the mod pack was working and running stable prior to this morning with Better Combat 1.8.6 - 1.20.1, and there was no change in the mod list this morning I do not believe that this is a mod compatibility issue as I am still able to generate a new world perfectly fine and the mod pack was working fine these last few days. The loading issue seems to only occur with my original survival world that I made when I built the mod pack.   Here is the last section from my latest.log file https://pastebin.com/6Q9e9ZLf  
×
×
  • Create New...

Important Information

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