Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Yes. Follow this instruction:

1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder.

 

2. Download Thermal Expansion and place it into /mods folder, that locates in /eclipse folder. Download RF-API source file and place it in the /lib folder you just created.

 

3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the TE file that you just placed in the /mods folder.

 

4. Open the "Referenced Libraries" tree in your package explorer, find the API binary that you just referenced and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to the source file in the /lib folder.

Original tutorial by coolAlias. Edited by me. Tip: use search.

  • Author

Thank you but I was referring specifically to the gradle build system and dependencies as briefly explained here https://github.com/MinecraftForge/ForgeGradle/wiki/Dpendencies.

The instructions you gave involve cloning the repo, compiling the jar and linking in eclipse (I'm using IntelliJ anyway).

What I'm wondering is if the Gradle build system can do essentially the same thing automatically by listing it as a dependency in the build.gradle file.

 

TeamCoFH doesn't have maven repo, that's why I didn't talk about Maven Dependency. And yes, I forgot to talk about compiling. You should compile your mod so:

Open build.gradle file, and add the following code:

dependencies {
compile files ("lib/RF-API.jar")
}

P.S in mcmod.info add following code:

"dependencies": ["ThermalExpansion"],
"useDependencyInformation": "true"

P.P.S As far as I know, Redstone Flux API is only used in Thermal Expansion, that's why I printed "ThermalExpansion" (mod ID) in "dependencies" field.

  • Author

Ah I'm new to these build systems.

After looking it up it seems you can only depend on Maven and Ivy repositories remotely, can you not depend on a remote repository that uses Gradle to build?

 

The 3 lines you said to add to build.gradle, just to clarify, is that compiling the lib source files into a jar or is it taking an already compiled jar in compilation of my project?

 

Not sure if that's quite right about TE as dependency, many mods use it and you can use those mods without TE installed (such as ExtraUtils and AE2).

 

Thank you

You are new. Gradle and Maven are diffrent things, as Ivy and Ant. Read about it in wikipedia. Those 3 lines compile source of RF-API.

  • Author

I understand they are different build systems, in the documentation it has instructions on linking an external Maven or Ivy repository to use as a dependency. Can you not link to an external repository that uses gradle to build, or am I missing something fundamental here?

Yes, you can do it with Maven and Ivy publishing plugin for Gradle. Read about Ivy plugin here and about Maven plugin here.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.